MooseX...Command(3pm)
π MooseX::App::Cmd::Command β the manual, but make it slay π
okay bestie, so this page is straight out of the User Contributed Perl Documentation collection, and it's for MooseX...Command. That trailing (3pm) is just the man page section, iykyk β it means "perl module, section 3". And the version we're vibing with here is version 0.34 β¨
πΈ NAME πΈ
MooseX::App::Cmd::Command β it's the base class for MooseX::Getopt-based App::Cmd::Commands. That's the whole title, no notes. π
β¨ VERSION β¨
version 0.34 π
π¦ SYNOPSIS π¦
okay so here's the actual snippet, copied verbatim because we do NOT mess with code in this house:
use Moose;
extends qw(MooseX::App::Cmd::Command);
# no need to set opt_spec
# see MooseX::Getopt for documentation on how to specify options
has option_field => (
isa => 'Str',
is => 'rw',
required => 1,
);
sub execute {
my ( $self, $opts, $args ) = @_;
print $self->option_field; # also available in $opts->{option_field}
}
the way that comment says # no need to set opt_spec?? iconic. you literally justβ¦ don't. and then MooseX::Getopt docs are where you go for how to specify options, periodt. π
π DESCRIPTION π
so this is a replacement base class for App::Cmd::Command classes π«Ά it throws MooseX::Getopt all up in there, plus the glue that makes the two of them play nice together. they're combined. they're a unit. no cap. π
π METHODS π
_process_args π§
this one replaces App::Cmd::Command's argument processing in favor of MooseX::Getopt-based processing. out with the old, in with the moose π
and hmm, listen β if your class does the MooseX::ConfigFromFile role (or any of its consuming roles, like MooseX::SimpleConfig), then this will hook you up with an additional --configfile command line option for loading options straight out of a configuration file. cute AND functional. β
π SUPPORT π
bugs?? bestie, they may be submitted through the RT bug tracker at <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-App-Cmd> β or you can email <bug-MooseX-App-Cmd@rt.cpan.org> π
there's also a mailing list for users of this distribution, sitting pretty at <http://lists.perl.org/list/moose.html> π
and there's an irc channel too, for users of this distribution, at "#moose" on "irc.perl.org" <irc://irc.perl.org/#moose> πΈ come hang, fr fr.
π AUTHOR π
XXXX XXX'XX (Yuval Kogman) β <nothingmuch@woobling.org> π
π COPYRIGHT AND LICENCE π
This software is copyright (c) 2008 by Infinity Interactive, Inc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like. go off. π
ngl the whole thing is free software and it's giving "just use it, bestie" energy. no gatekeeping. we love to see it. π
okay and for the lil sign-off moment: this page came from perl v5.36.0, dated 2022-10-16, and lives under the title MooseX...Command(3pm). that's the footer, babes β we folded it in, we said goodbye to it properly, we did NOT copy-paste the line. β¨π¦π
π¦ where this page comes from
- ubuntu noble: libmoosex-app-cmd-perl 0.34-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmoosex-app-cmd-perl 0.34-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmoosex-app-cmd-perl 0.34-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms