Build Status

NAME

DBIx::Tracer - Easy tracer for DBI

SYNOPSIS

use DBIx::Tracer;

my $tracer = DBIx::Tracer->new(
    sub {
        my %args = @_;
        say $args{dbh};
        say $args{time};
        say $args{sql};
        say "Bind: $_" for @{$args{bind_params}};
    }
);

DESCRIPTION

DBIx::Tracer is easy tracer for DBI. You can trace a SQL queries without modifying configuration in your application.

You can insert snippets using DBIx::Tracer, and profile it.

GUARD OBJECT

DBIx::Tracer uses Scope::Guard-ish guard object strategy.

DBIx::Tracer->new installs method modifiers, and DBIx::Tracer->DESTROY uninstall method modifiers.

You must keep the instance of DBIx::Trace in the context.

METHODS

CALLBACK OPTIONS

DBIx::Tracer passes following parameters to callback function.

FAQ

AUTHOR

Tokuhiro Matsuno <tokuhirom AAJKLFJEF@ GMAIL COM>

THANKS TO

xaicron is author of DBIx::QueryLog. Most part of DBIx::Tracer was taken from DBIx::QueryLog.

SEE ALSO

DBIx::QueryLog

LICENSE

Copyright (C) Tokuhiro Matsuno

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.