Skip to content

henryykt/Debug-DBI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

Debug::DBI - Tool to monitor/dump DBI calls

SYNOPSIS

To print all DBI calls incl. SQL statements and query results to
stdout.

In perl script:

  use Debug::DBI::Default;

or from command line:

  perl -MDebug::DBI::Default <script name>

For fine-graind control:

  use Log::Any::Adapter
  use DBI;
  use Debug::DBI

  Log::Any::Adapter->set(
      {
          category => 'Debug::DBI'
      },
      'FileHandle',
  };

  our $obj = Debug::DBI->new(
     formatter     => Debug::DBI::Formatter->new,
     hide_password => 0,
     constraint => {
        'default' => sub {
            my ($call) = @_;

            # ...

            return 1;
        }
     }
  )->install;

DESCRIPTION

This module allows you to trace and dump DBI calls.

TODO - Formatter: - support multi-line values - limit column width - DBI - Error handling: better support for RaiseError = 0; (Check return value and dbh->errstr!)

ATTRIBUTES

constraint

formatter

hide_password

log_category

max_rows

patch_map

patches

wrap_orig

METHODS

SEE ALSO

Log::Any, Log::Any::Adapter

AUTHOR

Henry Tang

COPYRIGHT & LICENSE

Copyright (C) 2011 Henry Tang

Debug::DBI is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for a particular purpose.

This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.

About

Tool to monitor/dump DBI calls

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages