MooseX...ribute(3pm)
π MooseX::XSAccessor::Trait::Attribute π
okay bestie, so this is a page from the User Contributed Perl Documentation for the MooseX...ribute(3pm) man page β yes the header truncates it like that, it's giving β¨abbreviatedβ¨. The full name is MooseX::XSAccessor::Trait::Attribute and we're about to make it make sense, fr fr.
πΈ NAME πΈ
MooseX::XSAccessor::Trait::Attribute β it's the whole "give one single attribute that Class::XSAccessor effect" situation. Like, one attribute. Not all of them. Just the one you picked. Very main character energy, honestly π
β¨ SYNOPSIS β¨
here's the vibe, copied exactly because you do NOT mess with working code:
package MyClass;
use Moose;
has foo => (
traits => ["MooseX::XSAccessor::Trait::Attribute"],
...,
);
say __PACKAGE__->meta->get_attribute("foo")->accessor_is_simple;
so you slap traits => ["MooseX::XSAccessor::Trait::Attribute"] onto a has, drop your Moose in, and then you can literally ask __PACKAGE__->meta->get_attribute("foo")->accessor_is_simple and it'll tell you things. obsessed π«Ά
π DESCRIPTION π
attributes that rock this trait get some extra methods bolted on. and every single one of them returns booleans β like, true/false, yes/no, ate/didn't eat. that's it. that's the whole thing. here they are:
accessor_is_simplereader_is_simplewriter_is_simplepredicate_is_simpleclearer_is_simple
okay but what do we even mean by "simple"?? excellent question, bestie π§ simple means: simple enough for Class::XSAccessor to take over the accessor's duties. that's the bar. if it clears that bar, it's simple. if it doesn't, it's not, and the boolean will let you know. no cap. π
π BUGS π
found a bug? pls pls pls report it here, don't just suffer in silence π:
https://github.com/tobyink/p5-moosex-xsaccessor/issues
they wanna know. the issues page is right there. go off π
π SEE ALSO π
MooseX::XSAccessorβ the parent situation, go look at it next, iykyk
π AUTHOR π
Toby Inkster <tobyink@cpan.org> β king behavior, honestly π
β COPYRIGHT AND LICENCE β
this software is copyright (c) 2013, 2022 by Toby Inkster.
it's free software π β you can redistribute it and/or modify it under the very same terms as the Perl 5 programming language system itself. that's the deal, and it's a good deal.
π DISCLAIMER OF WARRANTIES π
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
so like. it is what it is. use it, love it, but nobody's promising you anything π
and that's the whole page bestie, you're so welcome π this was perl v5.40.1, dated 2026-02-15, and it's the MooseX...ribute(3pm) page from the User Contributed Perl Documentation. slay, go make some simple accessors β¨ππ¦
π¦ where this page comes from
- ubuntu resolute: libmoosex-xsaccessor-perl 0.010-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmoosex-xsaccessor-perl 0.010-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