Pod::S...:Debug(3perl)
π Pod::S...:Debug β the tea β
okay bestie, so this is the manpage for Pod::S...:Debug(3perl) β that's the one living in the Perl Programmers Reference Guide (yes the title got chopped up like that, it's giving β¨abbreviatedβ¨ but that's literally what it says). she's a tiny module. she has one job. let's get into it π«Ά
πΈ NAME πΈ
Pod::S...:Debug β put Pod::Simple into trace/debug mode πβ¨
π SYNOPSIS π
the classic glow-up, the one-line version:
use Pod::Simple::Debug (5); # or some integer
Or:
my $debuglevel;
use Pod::Simple::Debug (\$debuglevel, 0);
...some stuff that uses Pod::Simple to do stuff, but which
you don't want debug output from...
$debug_level = 4;
...some stuff that uses Pod::Simple to do stuff, but which
you DO want debug output from...
$debug_level = 0;
β οΈ not me pointing out that the original flips between$debugleveland$debug_levelβ that's literally in the source, so it's staying exactly like that, periodt π
β¨ DESCRIPTION β¨
so this is an internal module. it controls the debug level (a.k.a. the trace level) of Pod::Simple. it's giving "backstage pass only" ποΈ β the only people who care about this are Pod::Simple developers. if that's not you, you can scroll, no hard feelings π
π CAVEATS π (read these fr fr)
okay so listen up because these are the β¨importantβ¨ ones:
- you should load this module before loading Pod::Simple (or any Pod::Simple-based class). if you try loading
Pod::Simple::Debugafter&Pod::Simple::DEBUGis already defined,Pod::Simple::Debugwill throw a fatal error to the effect that "It's too late to call Pod::Simple::Debug". and she means it. it's too late. bestie you missed the window π - also, the
use Pod::Simple::Debug (\$x, somenum)mode will make Pod::Simple (et al) run rather slower, because&Pod::Simple::DEBUGwon't be a constant sub anymore, and so Pod::Simple (et al) won't compile with constant-folding. so likeβ¦ you're trading speed for the dynamic vibe. know that before you commit π’π₯
π§ GUTS π§ (the behind-the-scenes lore)
doing this:
use Pod::Simple::Debug (5); # or some integer
is basically equivalent to:
BEGIN { sub Pod::Simple::DEBUG () {5} } # or some integer
use Pod::Simple ();
And this:
use Pod::Simple::Debug (\$debug_level,0); # or some integer
is basically equivalent to this:
my $debug_level;
BEGIN { $debug_level = 0 }
BEGIN { sub Pod::Simple::DEBUG () { $debug_level }
use Pod::Simple ();
π that last block is verbatim, brace situation and all β iconically it's written exactly like that in the source, so we're preserving the moment, no editing, no notes
π SEE ALSO π
- Pod::Simple
- the article "Constants in Perl", in The Perl Journal issue 21. See <http://interglacial.com/tpj/21/> π
π«Ά SUPPORT π«Ά
got questions? wanna discuss POD and Pod::Simple? send them to the pod-people@perl.org mail list. to subscribe, send an empty email to pod-people-subscribe@perl.org π§ (yes, empty. just vibes. send nothing.)
this module is managed in an open GitHub repository, <https://github.com/perl-pod/pod-simple/>. feel free to fork and contribute π΄β¨, or to clone <https://github.com/perl-pod/pod-simple.git> and send patches!
patches against Pod::Simple are welcome π. please send bug reports to <bug-pod-simple@rt.cpan.org> π
π COPYRIGHT AND DISCLAIMERS π
Copyright (c) 2002 Sean M. Burke.
this library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
this program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. π«
π AUTHOR π
Pod::Simple was created by Sean M. Burke <sburke@cpan.org>. but don't bother him, he's retired. π let the man rest, he earned it β¨
Pod::Simple is maintained by:
- Allison Randal "
allison@perl.org" - Hans Dieter Pearcey "
hdp@cpan.org" - David E. Wheeler "
dwheeler@cpan.org"
and that's the whole thing bestie, no cap π
we're running off perl v5.44.0, dated 2026-10-17, and this page is a proud resident of the Perl Programmers Reference Guide section 3perl β slay, go debug something, iykyk π¦β¨π
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND 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