POD::PERLDOC::GETOPTSOO(3pm)

πŸŽ€ NAME πŸŽ€

Okay bestie, this is Pod::Perldoc::GetOptsOO from the Perl Programmers Reference Guide β€” the customized option parser for Pod::Perldoc. It’s giving very specific, very useful option-parsing energy, and yes, we’re gonna get into all of it. πŸ’…


✨ SYNOPSIS ✨

use Pod::Perldoc::GetOptsOO ();

Pod::Perldoc::GetOptsOO::getopts( $obj, \@args, $truth )
   or die "wrong usage";

πŸ’… DESCRIPTION πŸ’…

Okay so Pod::Perldoc::GetOptsOO implements a customized option parser used for Pod::Perldoc. It’s rather like Getopt::Std’s getopts, but with its own little rules, and here’s the whole tea:

Call Pod::Perldoc::GetOptsOO::getopts($object, \@ARGV, $truth) β€” that’s the main character call. πŸ’«

  • Given -n, if there’s a opt_n_with, it’ll call $object->opt_n_with( ARGUMENT ) (e.g., "-n foo" => $object->opt_n_with('foo'). Ditto "-nfoo")
  • Otherwise (given -n) if there’s an opt_n, we’ll call it $object->opt_n($truth) (Truth defaults to 1)
  • Otherwise we try calling $object->handle_unknown_option('n') (and we increment the error count by the return value of it)
  • If there’s no handle_unknown_option, then we just warn, and then increment the error counter

The return value of Pod::Perldoc::GetOptsOO::getopts is true if no errors, otherwise it’s false. Slay. βœ…


πŸ‘€ SEE ALSO πŸ‘€

Pod::Perldoc β€” that’s the one. Go read it, bestie. πŸ’–


Copyright (c) 2002-2007 Sean M. Burke. πŸ“œ

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. So yes, free software vibes. πŸ’–

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. That’s the legal disclaimer, no cap. ⚠️


πŸ’– AUTHOR πŸ’–

Current maintainer: Mark Allen <mallen@cpan.org> πŸ’Œ

Past contributions from: brian d foy <bdfoy@cpan.org>, Adriano R. Ferreira <ferreira@cpan.org>, Sean M. Burke <sburke@cpan.org> 🌟


Later, bestie! This page is chilling with perl v5.42.3 and dated 2026-11-03 β€” mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from