Debug::Trace(3pm) | User Contributed Perl Documentation | Debug::Trace(3pm) |
Debug::Trace - Perl extension to trace subroutine calls
perl -MDebug::Trace=foo,bar yourprogram.pl
Debug::Trace instruments subroutines to provide tracing information upon every call and return.
Using Debug::Trace does not require any changes to your sources. Most often, it will be used from the command line:
perl -MDebug::Trace=foo,bar yourprogram.pl
This will have your subroutines foo() and bar() printing call and return information.
Subroutine names may be fully qualified to denote subroutines in other packages than the default main::.
By default, the trace information is output using the standard warn() function.
Modifiers can be inserted in the list of subroutines to change the default behavior of this module. All modifiers can be used in three ways:
The following modifiers are recognized:
The following modifiers can be used to control the way Data::Dumper prints the values of parameters and return values. See also Data::Dumper.
Modifiers apply only to the subroutines that follow in the list of arguments.
None, actually. Everything is handled by the module's import.
Environment variable "PERL5DEBUGTRACE" can be used to preset initial modifiers, e.g.:
export PERL5DEBUGTRACE=":warn:indent(2):nomaxdepth:quotekeys"
Data::Dumper, Carp
Jan-Pieter Cornet <jpc@cpan.org>; Jos Boumans <kane@cpan.org>; Johan Vromans <jv@cpan.org>;
This is an Amsterdam.pm production. See http://amsterdam.pm.org.
Current maintainer is Johan Vromans <jv@cpan.org>.
Copyright 2002,2013 Amsterdam.pm. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2018-04-07 | perl v5.26.1 |