Cataly...kTrace(3pm)
π Catalyst::Plugin::StackTrace π
okay bestie, so this is a page from User Contributed Perl Documentation, and it's all about Catalyst::Plugin::StackTrace β the plugin that shows you a stack trace right on your debug screen. icon behavior. let's get into it π«Ά
β¨ NAME β¨
Catalyst::Plugin::StackTrace β it displays a stack trace on the debug screen. that's it, that's the job, and it does it gorgeously π
πΈ SYNOPSIS πΈ
use Catalyst qw/-Debug StackTrace/;
like, that's the whole thing. one line. we love a low-effort slay β¨
π¦ DESCRIPTION π¦
so basically, this plugin glows up the standard Catalyst debug screen by adding a stack trace of your app, all the way up to the exact point where the error happened. every single stack frame gets shown, and each one comes with the package name, the line number, the file name, and the code context surrounding that line number. full picture, no crumbs π
by default this plugin is only active in -Debug mode. but if you want it on anyway, you can flip it on with the enable config option. your app, your rules, no cap.
π CONFIGURATION π
config is optional, btw. and when you do set it, you put it in MyApp->config->{stacktrace}. cute little nested hash, as a treat.
π enable
this one lets you forcibly enable or disable the plugin, straight-up ignoring whatever the current debug setting says. if this option is defined, its value is what gets used. periodt.
π context
the number of context lines of code to show on either side of the stack frame line. defaults to 3. so you get the lil before-and-after, like a good story needs setup and payoff.
π reverse
by default, the stack frames show up from "top" to "bottom" (that's newest to oldest). turning this option on reverses them, so you get "bottom" to "top" instead β aka from the caller's perspective. main character POV change π«
β verbose
this one sets how many stack frames you want to see in the stack trace. it defaults to 0, which means only frames from your application's namespace get shown. levels 1 and 2 exist for deeper debugging, iykyk.
if you set it to 1, the stack trace will include frames from packages outside your application's namespace β but not from most of the Catalyst internals. the packages ignored at this level are:
Catalyst
Catalyst::Action
Catalyst::Base
Catalyst::Dispatcher
Catalyst::Engine::*
Catalyst::Plugin::StackTrace
Catalyst::Plugin::Static::Simple
NEXT
main
if you set it to 2, the stack trace will include frames from everything except this module. full chaos, full transparency, we stan π
π§ INTERNAL METHODS π§
these are the methods this plugin extends. not your everyday hangout spot, but here's the tea:
executeβ in execute, we create a local die handler to generate the stack trace. lowkey the whole engine room of the operation π₯finalize_errorβ in finalize_error, we inject the stack trace HTML into the debug screen, right below the error message. so you never have to scroll-hunt for it πsetupβ extended by this plugin too. (the original really said "no further comment" on this one and honestly? respect.)
π SEE ALSO π
Catalyst
π«Ά AUTHORS π«Ά
- Andy Grundman,
<andy@hybridized.org> - Matt S. Trout,
<mst@shadowcatsystems.co.uk>
π THANKS π
shoutout to the authors of CGI::Application::Plugin::DebugScreen β a LOT of code was used from them. giving credit where credit is due, always π
πΈ COPYRIGHT πΈ
Copyright (c) 2005 - 2009 the Catalyst::Plugin::StackTrace "AUTHORS" as listed above. so like, the people up there. them. π
β¨ LICENSE β¨
this program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. go forth and remix, bestie π
fr fr, that's the whole page. every option, every default, every method. no details were harmed in the making of this glow-up π
kisses, and may your stack traces always be readable π
this was Cataly...kTrace(3pm) from perl v5.36.0, dated 2022-10-14, straight out of User Contributed Perl Documentation. mwah, bye π¦π
π¦ where this page comes from
- ubuntu noble: libcatalyst-plugin-stacktrace-perl 0.12-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatalyst-plugin-stacktrace-perl 0.12-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatalyst-plugin-stacktrace-perl 0.12-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms