MooseX:...rsedArgv(3)
π MooseX::App::ParsedArgv(3) β parses @ARGV π
Okay so this page is from the User Contributed Perl Documentation manual, and it's giving very helpful helper-class energy. Pull up a chair, bestie π«Ά
πΈ NAME πΈ
MooseX::App::ParsedArgv β Parses @ARGV.
β¨ SYNOPSIS β¨
use MooseX::App::ParsedArgv;
my $argv = MooseX::App::ParsedArgv->instance;
foreach my $option ($argv->available('option')) {
say "Parsed ".$option->key;
}
π¦ DESCRIPTION π¦
This is a helper class that holds all options parsed from @ARGV, no cap. It is implemented as a singleton β¨
Bestie PSA: unless you are developing a MooseX::App plugin, you usually do not need to interact with this class. It's lowkey an internal icon, iykyk π
π METHODS π
π new
Create a new MooseX::App::ParsedArgv instance. It needs to be called as soon as possible β like literally ASAP, bestie β°
π« instance
Get the current MooseX::App::ParsedArgv instance. If there is no instance, a new one will be created π
π argv
Accessor for the initinal @ARGV β yes, that's the original spelling, and we're keeping it cute and exact π«Ά
π§ hints
ArrayRef of attributes that tells the parser which attributes should be regarded as flags without values π
β first_argv
Shifts the current first element from @ARGV π«‘
π available
my @options = $self->available($type);
OR
my @options = $self->available();
Returns an array of all parsed options or parameters that have not yet been consumed. The array elements will be MooseX::App::ParsedArgv::Element objects π
π₯ consume
my $option = $self->consume($type);
OR
my $option = $self->consume();
Returns the first option/parameter of the local @ARGV that has not yet been consumed as a MooseX::App::ParsedArgv::Element object β¨
π elements
Returns all parsed options and parameters π¦
π extra
Returns an array reference of unconsumed positional parameters and extra values π
Okay bestie, that's the whole page π This one is from perl v5.42.0, dated 2024-08-09, and yes that's the cute little sign-off. Slay. π
π¦ where this page comes from
- opensuse-leap 16.0: perl-MooseX-App 1.430.1-bp160.1.10 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms