MooseX...Dashes(3pm)
π NAME π
MooseX::Getopt::Dashes β bestie, it takes the underscores in your attribute names and turns them into dashes. That's the whole gig. Iconic, honestly.
β¨ VERSION β¨
version 0.78 β that's the one you're getting, no cap.
π SYNOPSIS π
okay so picture this:
package My::App;
use Moose;
with 'MooseX::Getopt::Dashes';
# Will be called as --some-thingy, not --some_thingy
has 'some_thingy' => (
is => 'ro',
isa => 'Str',
default => 'foo'
);
# Will be called as --another_thingy, not --another-thingy
has 'another_thingy' => (
traits => [ 'Getopt' ],
cmd_flag => 'another_thingy'
is => 'ro',
isa => 'Str',
default => 'foo'
);
# use as MooseX::Getopt
see how the first one gets a glow-up (underscore β dash) and the second one stays exactly as it is because we told it to? yeah. that's the vibe. π¦
πΈ DESCRIPTION πΈ
So MooseX::Getopt::Dashes is literally just a version of MooseX::Getopt that, when it's generating your command line flags, converts the underscores in your attribute names into dashes. that's it. that's the personality. β¨
and the way that you can selectively disable this?? on a per-attribute basis, bestie. just hand it a cmd_flag argument with the command flag you want for that specific attribute, and boom β no underscore-to-dash replacement will be done on the cmd_flag. it leaves it alone. respects its choices. π«Ά
π SUPPORT π
got bugs? we don't gatekeep. submit them through the RT bug tracker at <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Getopt> (or <mailto:bug-MooseX-Getopt@rt.cpan.org> β same energy, different door π).
there's also a mailing list for users of this distribution, lowkey a whole community, at <http://lists.perl.org/list/moose.html>.
and there's an irc channel too, for when you wanna talk to actual humans about this, at #moose on irc.perl.org β link right here: <irc://irc.perl.org/#moose> π§
π AUTHOR π
Stevan Little <stevan@iinteractive.com> β the main character who made this happen. periodt.
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2007 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. slay. π
okay that's the whole page bestie, go forth and flag responsibly π
this has been MooseX...Dashes(3pm) from the User Contributed Perl Documentation collection, running on perl v5.40.0, dated 2025-01-11 β ily, bye π π
π¦ where this page comes from
- debian trixie: libmoosex-getopt-perl 0.78-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmoosex-getopt-perl 0.78-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmoosex-getopt-perl 0.78-1 Β· 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