MouseX...oGetopt(3pm)

πŸ“¦
version 0.38 Β· 4 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’… MouseX::Getopt::Meta::Attribute::NoGetopt(3pm) ✨

okay bestie, this is one of those User Contributed Perl Documentation pages, and honestly? it's a lil bop. it's giving "quiet luxury" because it does exactly one thing and does it flawlessly. πŸŽ€


🌸 NAME 🌸

MouseX::Getopt::Meta::Attribute::NoGetopt β€” the optional meta attribute for ignoring params 🫢

like, it's literally in the name. No. Getopt. it says no to Getopt-ing. iconic behaviour, no notes. πŸ’–


✨ SYNOPSIS ✨

package App;
use Mouse;

with 'MouseX::Getopt';

has 'data' => (
    metaclass => 'NoGetopt',  # do not attempt to capture this param
    is        => 'ro',
    isa       => 'Str',
    default   => 'file.dat',
);

see how data is just out here living its life? that's the whole vibe. metaclass => 'NoGetopt' is the little "do not disturb" sign on the doorknob. πŸ™ˆ


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea. β˜•

This is a custom attribute metaclass β€” and yes, you can use it to specify that a specific attribute should not be processed by MouseX::Getopt. that's it. that's the job. πŸ’…

All you need to do is specify the NoGetopt metaclass, and boom, that attribute is officially off the guest list:

has 'foo' => (metaclass => 'NoGetopt', ... );

it's that simple, bestie. no cap. 🧚

lowkey the whole point is: some attributes are meant to be internal, and you do not want MouseX::Getopt reaching for them like it's grabbing the last strawberry in the fridge. NoGetopt is how you protect them. πŸ“

πŸ‘‘ SEE ALSO πŸ‘‘

ngl, there's nothing extra listed here, so this is just the vibe check section. 🫢


and that's a wrap, my love! πŸ’– this lil legend came to you courtesy of perl v5.32.1, dated 2021-09-16, and it's part of the MouseX::Getopt family β€” the User Contributed Perl Documentation section, if you're keeping receipts. go forth and protect your params, queen. πŸ‘‘βœ¨πŸ’…

πŸ“¦ where this page comes from