perlのcliなアプリをデバッグするなら、Devel::Trace を使うといいかもしれません。
$ perl -d:Trace ./test.pl ./tool/test.pl:10: main(); ./tool/test.pl:14: my $dbh = Baitai::DBI->connect(); /app/baitai/www/tool/../lib/Baitai/DBI.pm:11: my ($class) = @_; /app/baitai/www/tool/../lib/Baitai/DBI.pm:13: my $db = /app/baitai/www/tool/../lib/Baitai/DBI.pm:15: my $dbh = DBI->connect($db, /app/baitai/local/perl-5.10.1/lib/site_perl/5.10.1/i686-linux/DBI.pm:567: my $class = shift; /app/baitai/local/perl-5.10.1/lib/site_perl/5.10.1/i686-linux/DBI.pm:568: my ($dsn, $user, $pass, $attr, $old_driver) = my @orig_args = @_; /app/baitai/local/perl-5.10.1/lib/site_perl/5.10.1/i686-linux/DBI.pm:569: my $driver; /app/baitai/local/perl-5.10.1/lib/site_perl/5.10.1/i686-linux/DBI.pm:571: if ($attr and !ref($attr)) { # switch $old_driver<->$attr if called in old style /app/baitai/local/perl-5.10.1/lib/site_perl/5.10.1/i686-linux/DBI.pm:576: my $connect_meth = $attr->{dbi_connect_method}; /app/baitai/local/perl-5.10.1/lib/site_perl/5.10.1/i686-linux/DBI.pm:577: $connect_meth ||= $DBI::connect_via; # fallback to default /app/baitai/local/perl-5.10.1/lib/site_perl/5.10.1/i686-linux/DBI.pm:579: $dsn ||= $ENV{DBI_DSN} || $ENV{DBI_DBNAME} || '' unless $old_driver; /app/baitai/local/perl-5.10.1/lib/site_perl/5.10.1/i686-linux/DBI.pm:581: if ($DBI::dbi_debug) { /app/baitai/local/perl-5.10.1/lib/site_perl/5.10.1/i686-linux/DBI.pm:587: Carp::croak('Usage: $class->connect([$dsn [,$user [,$passwd [,\%attr]]]])') /app/baitai/local/perl-5.10.1/lib/site_perl/5.10.1/i686-linux/DBI.pm:591: $dsn =~ s/^dbi:(\w*?)(?:\((.*?)\))?://i /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:21: my ($class, $type, $list, $minbits, $none) = @_; /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:22: local $^D = 0 if $^D; /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:24: print STDERR "SWASHNEW @_\n" if DEBUG; /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:55: my $file; ## file to load data from, and also part of the %Cache key. /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:56: my $ListSorted = 0; /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:58: if ($type) /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:60: $type =~ s/^\s+//; /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:61: $type =~ s/\s+$//; /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:63: print STDERR "type = $type\n" if DEBUG; /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:71: my $caller1 = $type =~ s/(.+)::// ? $1 : caller(1); /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:65: GETFILE: /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:73: if (defined $caller1 && $type =~ /^(?:\w+)$/) { /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:74: my $prop = "${caller1}::$type"; /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:75: if (exists &{$prop}) { /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:75: if (exists &{$prop}) { /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:83: my $wasIs; /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:85: ($wasIs = $type =~ s/^Is(?:\s+|[-_])?//i) /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:97: require "unicore/PVA.pl"; /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:98: if ($type =~ /^([\w\s]+)[:=]\s*(.*)/) { /app/baitai/local/perl-5.10.1/lib/5.10.1/utf8_heavy.pl:113: