Debug-LTrace
view release on metacpan or search on metacpan
lib/Debug/LTrace.pm view on Meta::CPAN
our $VERSION = '0.03';
=head1 SYNOPSIS
use Debug::LTrace;
{
my $tracer = Debug::LTrace->new('tsub'); # create local tracer
tsub(1); # Tracing is on while $tracer is alive
}
tsub(2); # Here tracing is off
sub tsub {shift}
#or
perl -MDebug::LTrace='*' yourprogram.pl # trace all subroutines in package main
lib/Debug/LTrace.pm view on Meta::CPAN
# Trace "foo", "bar" subroutines in current package (can be not "main")
use Debug::LTrace qw/foo bar/;
# Trace all subroutines in current package (can be not "main")
use Debug::LTrace qw/*/;
# Trace all subroutines in package "SomeModule" and "AnotherModule::foo"
use Debug::LTrace qw/SomeModule::* AnotherModule::foo/;
=item local tracing (is on only when $tracer is alive):
# Trace foo, bar subroutines in current package (can be not "main")
my $tracer = Debug::LTrace->new( 'foo', 'bar' );
# Trace all subroutines in current package (can be not "main")
my $tracer = Debug::LTrace->new('*');
# Trace all subroutines in package SomeModule and AnotherModule::foo
my $tracer = Debug::LTrace->new('SomeModule::*', 'AnotherModule::foo');
( run in 1.202 second using v1.01-cache-2.11-cpan-39bf76dae61 )