MooseX::TraitFor::Meta::Class::BetterAnonClassNames(3pm)

MooseX::TraitFor::Meta::Class::BetterAnonClassNames3pm

Metaclass trait to *attempt* to demystify generated anonymous class names

Version

This document describes version 0.002003 of MooseX::TraitFor::Meta::Class::BetterAnonClassNames - released March 23, 2017 as part of MooseX-TraitFor-Meta-Class-BetterAnonClassNames.

Attributes

is_anon

Read-only, Boolean, default: false.

Provides an attribute in the place of "is_anon" in Class::MOP::Package.

anon_package_prefix

Read-only, String

Methods

_build_anon_package_prefix

Builder method for the "anon_package_prefix" attribute.

_anon_package_middle

Defines what the "middle" of our anonymous package names is; provided for ease of overriding and hardcoded to:

    ::__ANON__::SERIAL::

_anon_package_prefix

Returns the full prefix used to generate anonymous package names; if called on an instance then returns a sensible prefix (generally class name) stashed in "anon_package_prefix"; otherwise returns the result of a call to "_anon_package_prefix" in Moose::Meta::Class.

create

Set the package name to a nicer anonymous class name if is_anon is passed and true and anon_package_prefix is passed and a non-empty string.

create_anon_class

Create an anonymous class, as via "create_anon_class" in Moose::Meta::Class, but with a kinder, gentler package name -- if possible.

Summary

You really want to be looking at "with_traits" in MooseX::Util.

Trait aliases

BetterAnonClassNames

Resolves out to the full name of this trait.

Releases

4 releases since Debian 10 (Buster); the text changed 2 times.

  1. 10
  2. 11
  3. 12–13

Bugs

Please report any bugs or feature requests on the bugtracker website <https://github.com/RsrchBoy/moosex-traitfor-meta-class-betteranonclassnames/issues>

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

Author

Chris Weyl <[email protected]>

From libmoosex-traitfor-meta-class-betteranonclassnames-perl 0.002003-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.