MouseX...::Basic(3pm)
πΈ NAME πΈ
MouseX::Getopt::Basic β the role that gives you Getopt::Long functionality, bestie π
It's filed under the manual name MouseX...::Basic(3pm), in case you were squinting at your terminal wondering where you landed. You're in the right place, don't worry π«Ά
β¨ SYNOPSIS β¨
okay so here's the whole vibe, copy-paste ready:
## In your class
package My::App;
use Mouse;
with 'MouseX::Getopt::Basic';
has 'out' => (is => 'rw', isa => 'Str', required => 1);
has 'in' => (is => 'rw', isa => 'Str', required => 1);
# ... rest of the class here
## in your script
#!/usr/bin/perl
use My::App;
my $app = My::App->new_with_options();
# ... rest of the script here
## on the command line
% perl my_app_script.pl --in file.input --out file.dump
like. it literally just works. you consume the role, you declare your attributes, you call new_with_options(), and your flags are right there on the command line. no cap π₯
π DESCRIPTION π
This one is like MouseX::Getopt and you can absolutely use it instead of it β the one tiny difference is that it does not make use of Getopt::Long::Descriptive (or "GLD" for short). that's it. that's the whole personality π
π new_with_options π
See "new_with_options" in MouseX::Getopt. yeah bestie, the details live over there β go peek π
and that's the whole page, fr fr π this doc ships with perl v5.32.1, dated 2021-09-16, and it's the MouseX...::Basic(3pm) page from the User Contributed Perl Documentation collection. mwah, go write something iconic πβ¨
π¦ where this page comes from
- debian bookworm: libmousex-getopt-perl 0.38-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libmousex-getopt-perl 0.38-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmousex-getopt-perl 0.38-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