.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" 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 .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Catalyst::Plugin::StackTrace 3pm" .TH Catalyst::Plugin::StackTrace 3pm "2022-10-14" "perl v5.34.0" "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" Catalyst::Plugin::StackTrace \- Display a stack trace on the debug screen .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Catalyst qw/\-Debug StackTrace/; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This plugin will enhance the standard Catalyst debug screen by including a stack trace of your appliation up to the point where the error occurred. Each stack frame is displayed along with the package name, line number, file name, and code context surrounding the line number. .PP This plugin is only active in \-Debug mode by default, but can be enabled by setting the \f(CW\*(C`enable\*(C'\fR config option. .SH "CONFIGURATION" .IX Header "CONFIGURATION" Configuration is optional and is specified in MyApp\->config\->{stacktrace}. .SS "enable" .IX Subsection "enable" Allows you forcibly enable or disalbe this plugin, ignoring the current debug setting. If this option is defined, its value will be used. .SS "context" .IX Subsection "context" The number of context lines of code to display on either side of the stack frame line. Defaults to 3. .SS "reverse" .IX Subsection "reverse" By default, the stack frames are shown in from \*(L"top\*(R" to \*(L"bottom\*(R" (newest to oldest). Enabling this option reverses the stack frames so they will be displayed \*(L"bottom\*(R" to \*(L"top\*(R", or from the callers perspective. .SS "verbose" .IX Subsection "verbose" This option sets the amount of stack frames you want to see in the stack trace. It defaults to 0, meaning only frames from your application's namespace are shown. You can use levels 1 and 2 for deeper debugging. .PP If set to 1, the stack trace will include frames from packages outside of your application's namespace, but not from most of the Catalyst internals. Packages ignored at this level include: .PP .Vb 9 \& Catalyst \& Catalyst::Action \& Catalyst::Base \& Catalyst::Dispatcher \& Catalyst::Engine::* \& Catalyst::Plugin::StackTrace \& Catalyst::Plugin::Static::Simple \& NEXT \& main .Ve .PP If set to 2, the stack trace will include frames from everything except this module. .SH "INTERNAL METHODS" .IX Header "INTERNAL METHODS" The following methods are extended by this plugin. .IP "execute" 4 .IX Item "execute" In execute, we create a local die handler to generate the stack trace. .IP "finalize_error" 4 .IX Item "finalize_error" In finalize_error, we inject the stack trace \s-1HTML\s0 into the debug screen below the error message. .IP "setup" 4 .IX Item "setup" .SH "SEE ALSO" .IX Header "SEE ALSO" Catalyst .SH "AUTHORS" .IX Header "AUTHORS" Andy Grundman, .PP Matt S. Trout, .SH "THANKS" .IX Header "THANKS" The authors of CGI::Application::Plugin::DebugScreen, from which a lot of code was used. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 2005 \- 2009 the Catalyst::Plugin::StackTrace \*(L"\s-1AUTHORS\*(R"\s0 as listed above. .SH "LICENSE" .IX Header "LICENSE" This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.