Plack:...::Base(3pm)
π NAME π
Plack::Middleware::Debug::Base β the base class for Debug panels, bestie β¨
Manual page situation: this is Plack:...::Base(3pm) from the User Contributed Perl Documentation, and we're about to make it make sense π«Ά
π¦ SYNOPSIS π¦
package Plack::Middleware::Debug::YourPanel;
use parent qw(Plack::Middleware::Debug::Base);
sub run {
my($self, $env, $panel) = @_;
# Do something before the application runs
return sub {
my $res = shift;
# Do something after the application returns
};
}
β¨ DESCRIPTION β¨
Okay so, this is the base class for panels. That's the whole vibe. It's the parent class you inherit from when you're building your own Debug panel, so you don't have to reinvent the whole thing yourself. Iconic behavior, honestly π
πΈ METHODS πΈ
runβ this method gets called when a request has arrived, before the main application runs. It's giving "quick, do your little thing before the real app takes the stage" π
The parameters it hands you are $env, which is the PSGI environment hash reference, and $panel, which is a Plack::Middleware::Debug::Panel object. Two little besties passed straight into your method, no cap π
Now, if your panel needs to do some response munging, you should return a callback that takes $res β the response object. And here's the cute part: because you can return a closure, that response filter can also use $env and $panel easily. Closure said "I contain multitudes" and honestly? Slay π₯
π BUGS AND LIMITATIONS π
No bugs have been reported. Not one. Zero. The vibe check passed, fr fr β¨
Please report any bugs or feature requests through the web interface at <http://rt.cpan.org> π
π§ INSTALLATION π§
See perlmodinstall for information and options on installing Perl modules. It's got you covered on the how-to, bestie π¦
π AVAILABILITY π
The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit <http://www.perl.com/CPAN/> to find a CPAN site near you. Or see <http://search.cpan.org/dist/Plack-Middleware-Debug/> π
The development version lives at <http://github.com/miyagawa/plack-middleware-debug/>. Instead of sending patches, please fork this project using the standard git and github infrastructure. Fork it, bestie, it's the moment πΈ
π AUTHORS π
- Marcel Gruenauer,
<marcel@cpan.org> - Tatsuhiko Miyagawa,
<miyagawa@bulknews.net>
β COPYRIGHT AND LICENSE β
Copyright 2009 by Marcel Gruenauer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
okay that's the whole page, no notes, you understood all of it, I'm so proud of you π«Ά
Sign-off time: this was rendered by perl v5.36.0, dated 2022-10-14, and it's the Plack:...::Base(3pm) page from the User Contributed Perl Documentation. Byeee, go write a panel π
π¦ where this page comes from
- ubuntu noble: libplack-middleware-debug-perl 0.18+dfsg-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libplack-middleware-debug-perl 0.18+dfsg-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libplack-middleware-debug-perl 0.18+dfsg-2 Β· 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