Getopt:...::Usage(3)
π Getopt:...::Usage(3) β the manual page, but make it make sense π
okay bestie, you found Getopt:...::Usage(3), the user-contributed Perl doc for Getopt::Long::Descriptive::Usage, aka the usage description for GLD. it's giving utility, it's giving behind-the-scenes, and honestly? it's shorter than you think. let's go π«Ά
β¨ NAME β¨
Getopt::Long::Descriptive::Usage β the usage description for GLD π
π VERSION π
version 0.117 β that's the vibe, that's the number, no cap.
πΈ SYNOPSIS πΈ
use Getopt::Long::Descriptive;
my ($opt, $usage) = describe_options( ... );
$usage->text; # complete usage message
$usage->die; # die with usage message
like, that's the whole flex. you get an $opt and a $usage back, and then $usage is your girl for printing or yeeting out an error. π
π¦ DESCRIPTION π¦
okay so real talk: this document only describes the methods of the Usage object. that's it. that's the scope. if you want to know how to actually use Getopt::Long::Descriptive, you gotta go read its documentation instead, because this page is not that page. π
β PERL VERSION β
this library should run on perls released even a long time ago, bestie. like, it should work on any version of perl released in the last five years. lowkey iconic for a piece of software to be that chill. π
but listen β although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. the version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. so don't come for her with a downgrade PR, she's not doing that. π
π METHODS π
π new
my $usage = Getopt::Long::Descriptive::Usage->new(\%arg);
ngl you really don't need to call this. GLD will do it for you. let the framework handle it, she's got it. π«Ά
valid arguments are:
optionsβ an arrayref of optionsleader_textβ the text that leads the usage; this may go away! π
π text
this returns the full text of the usage message. the whole thing. the complete package. β¨
π§ leader_text
this returns the text that comes at the beginning of the usage message. the intro, the opener, the little preamble moment. π
π option_text
this returns the text describing the available options. all the flags, all the goodness. π
π warn
this warns with the usage message. just a warning, she's not mad, she's just disappointed. π
π die
this throws the usage message as an exception. dramatic? yes. effective? also yes.
$usage_obj->die(\%arg);
some arguments can be provided:
pre_textβ text to be prepended to the usage messagepost_textβ text to be appended to the usage message
β οΈ thepre_textandpost_textarguments are concatenated with the usage message with no line breaks, so supply this if you need them. like, if you need newlines, you have to bring them yourself. no free formatting here. π«
π«Ά AUTHORS π«Ά
- Hans Dieter Pearcey
<hdp@cpan.org> - Ricardo Signes
<cpan@semiotic.systems>
two icons, one module. periodt. π
π COPYRIGHT AND LICENSE π
this software is copyright (c) 2005 by Hans Dieter Pearcey.
this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, honestly. open source royalty fr fr. π
okay that's the whole page, bestie!! this was Getopt:...::Usage(3) β and per the footer, it's from perl v5.42.0, dated 2026-02-20, so if you're reading this from the future, hi, hope perl is thriving πΈβ¨ mwah, go describe some options π
π¦ where this page comes from
- fedora 44: perl-Getopt-Long-Descriptive 0.117-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms