POD2USAGE(1perl)
π POD2USAGE π
okay bestie, so you know how every good little script needs to tell people how to use it? this is the icon that does exactly that π
pod2usage β prints usage messages straight out of the embedded pod docs chillin' inside your files. no cap, it's giving β¨documentationβ¨ but make it a usage message.
It's part of the Perl Programmers Reference Guide, so you know it's legit.
β¨ SYNOPSIS β¨
pod2usage [-help] [-man] [-exit exitval] [-output outfile] [-verbose
level] [-pathlist dirlist] [-formatter module] [-utf8] file
she's short, she's sweet, she's fully loaded π
π¦ OPTIONS AND ARGUMENTS π¦
every flag, every argument, no gatekeeping π«Ά
-helpβ prints a lil brief help message and then dips (exits, bestie).-manβ prints this command's manual page and then exits. very meta of her, obsessed. π-exit exitvalβ the exit status value she hands back when she's done. pick your number, she'll take it.-output outfileβ where the output goes. it's the output file to print to. and listen, there are some special names with β¨main character energyβ¨:-or>&1or>&STDOUTβ standard output is used π«>&2or>&STDERRβ standard error is used π
-verbose levelβ how much tea she spills. the desired level of verbosity to use:1: print SYNOPSIS only2: print SYNOPSIS sections and any OPTIONS/ARGUMENTS sections3: print the entire manpage (similar to runningpod2text)
-pathlist dirlistβ tells her one or more directories to go searching through for the input file, in case you didn't hand over an absolute path (rude of you honestly, but okay π). every directory path in the list needs to be separated by a':'on Unix, and by a';'on MSWin32 and DOS. slay, cross-platform queen.-formatter moduleβ which text formatter to use. default isPod::Text. an alternative would be, like,Pod::Text::Termcapor whatever your heart desires π-utf8β this option assumes the formatter (see above, bestie, keep up) understands the option"utf8". it turns on generation of utf8 output. cute accents, no problem πΈfileβ the pathname of a file containing pod documentation that's gonna be output in usage message format. and here's the tea: if you omit it, standard input gets read β but the output is then formatted withPod::Textonly β unless you specifically named a formatter with-formatter. iykyk.
π DESCRIPTION π
pod2usage will read the input file you gave her, hunting for pod documentation, and will print the corresponding usage message. if no input file is specified, then standard input is read. simple as that, periodt. π
under the hood, pod2usage invokes the pod2usage() function in the Pod::Usage module. please see "pod2usage()" in Pod::Usage for the deets. π§
π SEE ALSO π
the whole friend group fr fr π
Pod::Usagepod2textPod::TextPod::Text::Termcapperldoc
π AUTHOR π
bugs?? please report them using <http://rt.cpan.org>. she wants to hear from you π«Ά
Brad Appleton <bradapp@enteract.com> π
based on code for pod2text(1) written by Tom Christiansen <tchrist@mox.perl.com> β
and that's the whole vibe bestie! this page is from perl v5.44.0, dated 2026-10-17, and it's the POD2USAGE(1perl) manual. go forth and print beautiful usage messages πβ¨ππ¦πΈπ
π¦ 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