MooseX...ssNames(3pm)
π NAME π
MooseX::TraitFor::Meta::Class::BetterAnonClassNames β bestie, it's a metaclass trait that attempts to demystify those cursed generated anonymous class names πβ¨
πΈ VERSION πΈ
This doc describes version 0.002003 of MooseX::TraitFor::Meta::Class::BetterAnonClassNames β dropped March 23, 2017, as part of the MooseX-TraitFor-Meta-Class-BetterAnonClassNames distribution π«Ά
π ATTRIBUTES π
is_anonβ Read-only, Boolean, default:false. It gives you an attribute whereis_anonlives inClass::MOP::Package. Basically it's filling in for the original πanon_package_prefixβ Read-only, String. That's it, that's the whole vibe β¨
π¦ METHODS π¦
_build_anon_package_prefixβ the builder method for theanon_package_prefixattribute, doing builder things π₯_anon_package_middleβ defines what the "middle" of our anonymous package names is. It's here so you can override it easily, and it's hardcoded to:
::__ANON__::SERIAL::
_anon_package_prefixβ returns the full prefix used to generate anonymous package names. If you call it on an instance, you get a sensible prefix (generally the class name) that's stashed inanon_package_prefixπ. Otherwise, it returns whatever a call to_anon_package_prefixinMoose::Meta::Classgives back.createβ sets the package name to a nicer anonymous class name, but only ifis_anonis passed and true andanon_package_prefixis passed and is a non-empty string. Two conditions, no shortcuts πcreate_anon_classβ creates an anonymous class exactly likecreate_anon_classinMoose::Meta::Classwould, except with a kinder, gentler package name β if possible π
β SUMMARY β
Okay so real talk: you really want to be looking at with_traits in MooseX::Util. That's the one, fr fr π
π TRAIT ALIASES π
BetterAnonClassNames
This one resolves out to the full name of this trait. Cute nickname, same trait π
πΈ SEE ALSO πΈ
Please peek at these modules/websites for more info related to this module:
MooseX::Util
π BUGS π
Please report any bugs or feature requests on the bugtracker website <https://github.com/RsrchBoy/moosex-traitfor-meta-class-betteranonclassnames/issues>
When you submit a bug or a request, please include a test-file or a patch to an existing test-file that illustrates the bug or the desired feature. Like, help us help you, bestie π«Ά
β¨ AUTHOR β¨
Chris Weyl <cweyl@alumni.drew.edu> π
π COPYRIGHT AND LICENSE π
This software is Copyright (c) 2014 by Chris Weyl.
This is free software, licensed under:
The GNU Lesser General Public License, Version 2.1, February 1999
And that's a wrap, gorgeous π
β this page came to you from perl v5.34.0, dated 2022-06-15, part of the User Contributed Perl Documentation. Go forth and have better anon class names, no cap π§π
π¦ where this page comes from
- debian bookworm: libmoosex-traitfor-meta-class-betteranonclassnames-perl 0.002003-2 Β· LGPL-2.1-only
- debian trixie: libmoosex-traitfor-meta-class-betteranonclassnames-perl 0.002003-2 Β· LGPL-2.1-only
- ubuntu noble: libmoosex-traitfor-meta-class-betteranonclassnames-perl 0.002003-2 Β· LGPL-2.1-only
- ubuntu resolute: libmoosex-traitfor-meta-class-betteranonclassnames-perl 0.002003-2 Β· LGPL-2.1-only
- ubuntu stonking: libmoosex-traitfor-meta-class-betteranonclassnames-perl 0.002003-2 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms