Webserver(3)
π Webserver(3) π
okay bestie, so this is Webserver(3) from the User Contributed Perl Documentation section, and it's literally one of my faves because it's so chill. it's the manpage for Pod::Webserver, and no cap, it's a whole vibe. π¦
β¨ NAME β¨
Pod::Webserver β a minimal web server that serves up your local Perl documentation. that's it, that's the girl. π
πΈ SYNOPSIS πΈ
% podwebserver
You can now point your browser at http://localhost:8020/
boom. run it, point your browser at that URL, done. main character energy fr. π
π DESCRIPTION π
so this module can be run as an application, and that application works as a minimal web server serving your local Perl documentation. it's like perldoc except the way it works is through your browser. it's giving glow-up. β¨
run podwebserver -h for a list of runtime options. iykyk. π«Ά
π₯ SECURITY (AND @INC) π₯
okay so let's be real here. Pod::Webserver is not what you'd call a gaping security hole β like, all it does, and all it could possibly do, is serve HTML versions of anything you could get by typing perldoc SomeModuleName. Pod::Webserver won't serve files at arbitrary paths or anything. she's well-behaved. periodt. π
but bestie, do consider whether you're revealing anything by basically showing off what versions of modules you've got installed π and also consider whether you could be revealing any proprietary or in-house module documentation. that's the part where we go π
and also consider that this exposes the documentation of modules (i.e., any Perl files that at all look like modules) in your @INC dirs β and your @INC probably contains "."! if your current working directory could contain modules whose Pod you don't want anyone to see, then you could do two things:
the cheap and easy way is to just chdir to an uninteresting directory:
mkdir ~/.empty; cd ~/.empty; podwebserver
the more careful approach is to run podwebserver under perl in -T (taint) mode (as explained in perlsec), and to explicitly specify what extra directories you want in @INC, like so:
perl -T -Isomepath -Imaybesomeotherpath -S podwebserver
you can also use the -I trick (that's a capital "igh", not a lowercase "ell" β important!! π) to add dirs to @INC even if you're not using -T. for example:
perl -I/that/thar/Module-Stuff-0.12/lib -S podwebserver
an alternate approach is to use your shell's environment-setting commands to alter PERL5LIB or PERLLIB before starting podwebserver. slay, do it your way. π
these -T and -I switches are explained in perlrun. but I'll note in passing that you'll likely need to do this to get your PERLLIB environment variable to be in @INC...
perl -T -I$PERLLIB -S podwebserver
(or replacing that with PERL5LIB, if that's what you use.) either one, we support the girlies. π
π ON INDEXING '.' IN @INC π
Pod::Webserver uses the module Pod::Simple::Search to build the index page you see at http://yourservername:8020/ (or whatever port you choose instead of 8020). that module's indexer has one notable DWIM feature: it reads over @INC, except that it skips the "." in @INC. iconic of it honestly.
but you can work around this by expressing the current directory in some other way than as just the single literal period β either as some more roundabout way, like so:
perl -I./. -S podwebserver
or by just expressing the current directory absolutely:
perl -I`pwd` -S podwebserver
note that even when "." isn't indexed, the Pod in files under it are still accessible β just as if you'd typed perldoc whatever and got the Pod in ./whatever.pl. so like, the docs stay serving, bestie. π
π SEE ALSO π
this module is implemented using many CPAN modules, including: Pod::Simple::HTMLBatch Pod::Simple::HTML Pod::Simple::Search Pod::Simple
see also Pod::Perldoc and <http://search.cpan.org/>. obsessed with them fr fr. π§
π COPYRIGHT AND DISCLAIMERS π
Copyright (c) 2004-2006 Sean M. Burke. All rights reserved.
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. (translation: she's free, she's hopeful, she promises nothing π)
π AUTHOR π
Original author: Sean M. Burke sburke@cpan.org
Maintained by: Allison Randal allison@perl.org
and that's the whole page, bestie!! this one's from perl v5.8.8, dated 2006-12-20 β yeah she's vintage, she's an elder icon, and she still slays. go serve some docs πβ¨π
π¦ where this page comes from
- debian bookworm: libpod-webserver-perl 3.11-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libpod-webserver-perl 3.11-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libpod-webserver-perl 3.11-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libpod-webserver-perl 3.11-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libpod-webserver-perl 3.11-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libpod-webserver-perl 3.11-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