logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Pod::Perldoc::GetOptsOO - Customized option parser for Pod::Perldoc

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>" perl v5.40.1 2025-07-03 Pod::Perldoc::GetOptsOO(3perl)

Description

Implements a customized option parser used for Pod::Perldoc. Rather like Getopt::Std's getopts: Call Pod::Perldoc::GetOptsOO::getopts($object, \@ARGV, $truth) 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.

Name

Pod::Perldoc::GetOptsOO - Customized option parser for Pod::Perldoc

See Also

Pod::Perldoc

Synopsis

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

See Also