Please do *not* start a new question by replying to an old one as
this causes several problems:
1) most email software will correctly think that your email is a
response to the email you are "replying" to, and will indicate this
by displaying your email as a child of the original email
2) because of this, people not interested in the original email may
ignore your question
3) people may think that the original email has a reply (yours) so
that they do not have to give it a reply

So in conclusion, more people will read your email if it looks like
the start of a new thread rather than the reply to an old one.

On 03/18/2005 08:50 AM, Tom Gazzini said:

What's the best way to use the 'trace' function of DBI to get debug output
while using Class::DBI ?

I'm using the standard Class::DBI->connection method (so not passing a DBI
handle myself).

Since I'm not familiar with Class::DBI, I used Google to find the Class::DBI main page. There I searched for 'trace' and found two pages.


In the Beginner's Guide page, I found:
=====
Turning on tracing to see your sql

my $dbh = Music::Artist->db_Main; $dbh->trace(2);
=====

In the See All SQL page, I found:
=====
...or log to a file using the DBI_TRACE environment variable...

DBI_TRACE=2=/tmp/logfile ./myscript.pl


...or by adding the following...

DBI->trace(2 => "/tmp/logfile");


in your code. See the documentation for DBI::Profile, DBI::ProfileDumper and DBI::Trace for more info.
=====


http://www.class-dbi.com/cgi-bin/wiki/index.cgi?HomePage

http://www.class-dbi.com/cgi-bin/wiki/index.cgi?BeginnersGuide

http://www.class-dbi.com/cgi-bin/wiki/index.cgi?SeeAllSQL

--
Mac :})
** I usually forward private questions to the appropriate mail list. **
Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.

Reply via email to