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>


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