.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Debug::Trace 3pm" .TH Debug::Trace 3pm "2018-04-07" "perl v5.26.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Debug::Trace \- Perl extension to trace subroutine calls .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& perl \-MDebug::Trace=foo,bar yourprogram.pl .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Debug::Trace instruments subroutines to provide tracing information upon every call and return. .PP Using Debug::Trace does not require any changes to your sources. Most often, it will be used from the command line: .PP .Vb 1 \& perl \-MDebug::Trace=foo,bar yourprogram.pl .Ve .PP This will have your subroutines \fIfoo()\fR and \fIbar()\fR printing call and return information. .PP Subroutine names may be fully qualified to denote subroutines in other packages than the default main::. .PP By default, the trace information is output using the standard \fIwarn()\fR function. .SS "\s-1MODIFIERS\s0" .IX Subsection "MODIFIERS" 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: .IP "\(bu" 4 \&\f(CW\*(C`:\*(C'\fR\fIname\fR to enable a specific feature. .IP "\(bu" 4 \&\f(CW\*(C`:no\*(C'\fR\fIname\fR to disable a specific feature. .IP "\(bu" 4 \&\f(CW\*(C`:\*(C'\fR\fIname\fR\f(CW\*(C`(\*(C'\fR\fIvalue\fR\f(CW\*(C`)\*(C'\fR to set a feature to a specific value. In general, \f(CW\*(C`:\*(C'\fR\fIname\fR is equivalent to \f(CW\*(C`:\*(C'\fR\fIname\fR\f(CW\*(C`(1)\*(C'\fR, while \&\f(CW\*(C`:no\*(C'\fR\fIname\fR corresponds to \f(CW\*(C`:\*(C'\fR\fIname\fR\f(CW\*(C`(0)\*(C'\fR. .PP The following modifiers are recognized: .IP ":warn" 4 .IX Item ":warn" Uses \fIwarn()\fR to produce the trace output (default). \f(CW\*(C`:nowarn\*(C'\fR Sends trace output directly to \s-1STDERR.\s0 .IP ":caller" 4 .IX Item ":caller" Add basic call information to the trace message, including from where the routine was called, and by whom. This is enabled by default. .IP ":stacktrace" 4 .IX Item ":stacktrace" Add a stack trace (call history). .IP ":maxlen(\fIlength\fR)" 4 .IX Item ":maxlen(length)" Truncate the length of the lines of trace information to \fIlength\fR characters. .PP The following modifiers can be used to control the way Data::Dumper prints the values of parameters and return values. See also Data::Dumper. .IP ":indent" 4 .IX Item ":indent" Controls the style of indentation. It can be set to 0, 1, 2 or 3. Style 0 spews output without any newlines, indentation, or spaces between list items. \f(CW:indent(0)\fR is the default. .IP ":useqq" 4 .IX Item ":useqq" When enabled, uses double quotes for representing string values. Whitespace other than space will be represented as \f(CW\*(C`[\en\et\er]\*(C'\fR, \&\*(L"unsafe\*(R" characters will be backslashed, and unprintable characters will be output as quoted octal integers. This is the default, use \f(CW\*(C`:nouseqq\*(C'\fR to disable. .IP ":maxdepth(\fIdepth\fR)" 4 .IX Item ":maxdepth(depth)" Can be set to a positive integer that specifies the depth beyond which which we don't print structure contents. The default is 2, which means one level of array/hashes in argument lists and return values is expanded. If you use \f(CW\*(C`:nomaxdepth\*(C'\fR or \f(CW:maxdepth(0)\fR, nested structures are fully expanded. .IP ":quotekeys" 4 .IX Item ":quotekeys" Controls wether hash keys are always printed quoted. The default is \&\f(CW\*(C`:noquotekeys\*(C'\fR. .IP "sortkeys" 4 .IX Item "sortkeys" Controls whether hash keys are dumped in sorted order. The default is \&\f(CW\*(C`:nosortkeys\*(C'\fR. .PP Modifiers apply only to the subroutines that follow in the list of arguments. .SH "METHODS" .IX Header "METHODS" None, actually. Everything is handled by the module's import. .SH "ENVIRONMENT VARIABLES" .IX Header "ENVIRONMENT VARIABLES" Environment variable \f(CW\*(C`PERL5DEBUGTRACE\*(C'\fR can be used to preset initial modifiers, e.g.: .PP .Vb 1 \& export PERL5DEBUGTRACE=":warn:indent(2):nomaxdepth:quotekeys" .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" Data::Dumper, Carp .SH "AUTHOR" .IX Header "AUTHOR" Jan-Pieter Cornet ; Jos Boumans ; Johan Vromans ; .PP This is an Amsterdam.pm production. See http://amsterdam.pm.org. .PP Current maintainer is Johan Vromans . .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2002,2013 Amsterdam.pm. All rights reserved. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.