MooseX...ssNames(3pm)

πŸ“¦
version 0.002003 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 where is_anon lives in Class::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 the anon_package_prefix attribute, 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 in anon_package_prefix πŸ‘‘. Otherwise, it returns whatever a call to _anon_package_prefix in Moose::Meta::Class gives back.
  • create β€” sets the package name to a nicer anonymous class name, but only if is_anon is passed and true and anon_package_prefix is passed and is a non-empty string. Two conditions, no shortcuts πŸ’€
  • create_anon_class β€” creates an anonymous class exactly like create_anon_class in Moose::Meta::Class would, 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> πŸ‘‘


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 πŸ§šπŸ’–