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
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