Re: Making trace show more than 2 elements
"Martin J. Evans" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.dbi.sybase.devel |
|---|---|
| Message-ID | <[email protected]> |
On 27/09/13 15:37, demerphq wrote:
> Is there an undocumented magic variable that will make DBI trace mode
> show more than the first two arguments to a function like
> selectrow_array() or similar?
>
> Cheers,
> Yves
>
Works for me:
DBI_TRACE=15=x.log perl -Iblib/lib/ -Iblib/arch/ -MDBI -le 'my $h = DBI->connect("dbi:ODBC:xxx","xx","xx"); my $x = $h->selectrow_arrayref(q/select * from mje where a= ?/, undef, "a");'
trace shows 3 arguments:
-> selectrow_arrayref for DBD::ODBC::db (DBI::db=HASH(0x9385508)~0x938542c 'select * from mje where a= ?' undef 'a') thr#9215008
There is also DBIx::Log4perl and DBIx::LogAny too if you want to trace just method calls and arguments.
Martin