Created
December 2, 2010 16:45
-
-
Save riywo/725640 to your computer and use it in GitHub Desktop.
easy QueryComment(where the query executed)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $dbh = DBI->connect('dbi:mysql:test','test','test', { | |
RaiseError => 1, | |
Callbacks => { | |
ChildCallbacks => { | |
execute => sub { | |
my ($obj, @binds) = @_; | |
my ($package, $file, $line) = caller; | |
$obj->{Database}->{Statement} .= "/* $package:$file:$line */"; | |
return; | |
}, | |
}, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment