MooseX...oGetopt(3pm)
π NAME π
okay so bestie, welcome to MooseX::Getopt::Meta::Attribute::NoGetopt β it's an optional meta attribute for ignoring parameters. yes, ignoring. we're being β¨selectiveβ¨ today.
(this is a page from the User Contributed Perl Documentation, section 3pm, just so you know where you are π«Ά)
π VERSION π
this is version 0.78 β she's grown up, she's stable, she's slaying π
β¨ SYNOPSIS β¨
package App;
use Moose;
with 'MooseX::Getopt';
has 'data' => (
metaclass => 'NoGetopt', # do not attempt to capture this param
is => 'ro',
isa => 'Str',
default => 'file.dat',
);
see that comment? # do not attempt to capture this param. that's the whole point of her. she's the "hands off, this one's mine" of metaclasses π
π¦ DESCRIPTION π¦
okay so real talk: this is a custom attribute metaclass, and what it does is let you say "hey, MooseX::Getopt, do not process this specific attribute." that's it. that's the job. and all you gotta do to make it happen is specify the NoGetopt metaclass. iconic behavior honestly.
has 'foo' => (metaclass => 'MooseX::Getopt::Meta::Attribute::NoGetopt', ... );
π Use 'traits' instead of 'metaclass' π
ngl bestie, you should rarely ever need to set the attribute metaclass explicitly. like, it's much preferred to just hand over a trait instead (a trait = a role that gets applied to the attribute metaclass), because that lets other code come along later and further modify the attribute by applying additional roles. teamwork makes the dream work π«Ά
so before you go setting a metaclass, try this first:
has 'foo' => (traits => ['NoGetopt', ...], ...);
π Custom Metaclass alias π
so this now takes advantage of the Moose 0.19 feature that supports custom attribute metaclasses. what does that mean for you? it means you can also use this as the NoGetopt alias, like so:
has 'foo' => (metaclass => 'NoGetopt', cmd_flag => 'f');
short, sweet, and it ate π₯
π SUPPORT π
found a bug? bestie, tell someone!! bugs may be submitted through the RT bug tracker:
<https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Getopt>
or you can email bug-MooseX-Getopt@rt.cpan.org βοΈ
there's also a mailing list available for users of this distribution, right here:
<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 β come vibe with the moose people:
<irc://irc.perl.org/#moose>
not me plugging three separate support channels, but genuinely, use them. someone will help you π
π AUTHOR π
Stevan Little <stevan@iinteractive.com>
πΈ 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. periodt. π
and that's the whole page, bestie! this one's from perl v5.40.0, dated 2025-01-11, and the manual name is MooseX::Getopt::Meta::Attribute::NoGetopt(3pm) β go forth and ignore some parameters, you absolute main character π
β¨π¦
π¦ 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