http://www.perlmonks.org?node_id=11138004


in reply to Re: DBI trace has limited output
in thread DBI trace has limited output

Thanks a lot for your effort.I found what happens.I had to wrap the following in a BEGIN block at the top of the CGI script:

BEGIN { $ENV{DBI_TRACE}='15=/var/www/xx/dbitrace.log';use DBI; }

The output now shows everything including the sql statements and the data retrieved.
What does BEGIN do and why has it made such a big difference? I think it has something to do with the environment that Apache/CGI runs,like that Apache initializes something before the perl script runs? What do you think?