Getopt:...ve::Opts(3)

πŸ’– Getopt::Long::Descriptive::Opts πŸ’–

okay bestie, welcome to the User Contributed Perl Documentation section, and specifically to Getopt::Long::Descriptive::Opts(3) β€” yes that's a whole lot of colons, we love a dramatic name πŸ’…


✨ NAME ✨

Getopt::Long::Descriptive::Opts β€” literally just an object representing command line switches πŸŽ€


🌸 VERSION 🌸

version 0.117 β€” she's giving vintage but make it cute ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so this class is the base class of every $opt object that Getopt::Long::Descriptive hands back to you. and like… genuinely? you do not want to think about this class. don't look at it. don't alter it. she said what she said. fr fr, it's pretty dumb 😭 (that's a direct quote from the source, not me being mean, i prommy)

every single time you call describe_options, you get back an object of a brand new subclass of this class. and that lil subclass? she comes with a method for the canonical name of every option that's possible given your option specifications. one method per option, all custom, all iconic πŸ‘‘

and here's the naming tea: method names starting with a single underscore are public β€” they're named like that on purpose so they don't clash with all the automatically generated methods. methods with multiple underscores (in case you're out here reading the source, you little detective πŸ•΅οΈ) are private. iykyk.


🌈 PERL VERSION 🌈

this library should run on perls released even, like, a long time ago. she should work on any version of perl released in the last five years 🫢

although she may work on older versions of perl, there is no guarantee that the minimum required version won't be increased. the version may be increased for any reason whatsoever, and there is no promise that patches will be accepted to lower the minimum required perl. so like… don't count on it bestie πŸ’€


🧚 METHODS 🧚

Achtung! πŸ‘€ All methods beginning with an underscore are experimental as of today, 2009-12-12. They are likely to be formally made permanent soon. so like, use them but know they're in their ✨era✨

_specified πŸ’–

this method returns true if the given name was specified on the command line.

for example, if @ARGS was "--foo --bar 10" and "baz" is defined by a default, then _specified will return true for foo and bar, and false for baz. slay, that's the whole vibe check 🎯

_specified_opts ✨

this method returns an opt object where only explicitly specified values are defined. values that were set by defaults? they'll appear as undef. no cap πŸ«₯

_complete_opts 🌸

this method returns the opts object with all values, including the ones set by defaults. honestly? it's probably not going to be very often-used. she's the main character but nobody's calling her πŸ“ž


πŸ‘‘ AUTHORS πŸ‘‘

  • Hans Dieter Pearcey <hdp@cpan.org>
  • Ricardo Signes <cpan@semiotic.systems>

two absolute legends, we stan 🫢


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. periodt. πŸ’…


and that's the whole page, bestie!! 🌈⭐ this was perl v5.42.0, dated 2026-02-20 β€” mwah, tysm for reading, go forth and getopt responsibly πŸŽ€πŸ’–πŸ¦‹

πŸ“¦ where this page comes from