dip script to show DBI queries as they are prepared

There's DBI_TRACE, but sometimes I just want to see the queries that are used in $dbh->prepare(). Here is a simple dip script to do that.

dip -e 'before { warn ARGS(1) } call qr/DBI::.*::prepare/' foo.pl

1 Comment

In this example, it looks like you are inserting debugging print statements without having to modify the source code or run the debugger. This looks like it could be very powerful.

Have you considered doing a screencast demonstrating how you might use this tool? Gabor makes excellent screencasts that you could emulate. Check out http://szabgab.com/blog/tags/screencast.html

Leave a comment

About Marcel Grünauer

user-pic perlservices.at is a B2B service provider for Perl in Vienna, Austria. I'm a professional software developer since 1989 and a Perl specialist since 1998. I also like Go (囲碁), Japanese and Korean culture and language.