
DBIx::Roles::Hook - Exports callbacks to override DBI calls.

Exports a single attribute Hooks that is a hash,
where keys are connect,
disconnect,
any,
rewrite,
dbi_method,
STORE,
and values are code references,
to be called when the corresponding calls occur.

use DBIx::Roles qw(Hook);
my $dbh = DBI-> connect(
"dbi:Pg:dbname=template1",
"postgres",
"password",
{
Hooks => {
do => sub {
my ( $self, undef, @param) = @_;
return 42; # no do
},
}
}
);
print $dbh-> do("SELECT meaning FROM life");


Copyright (c) 2005 catpipe Systems ApS. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Dmitry Karasik <dk@catpipe.net>