---
name: "MooseX::TraitFor::Meta::Class::BetterAnonClassNames"
section: "3pm"
platform: "linux"
package: "libmoosex-traitfor-meta-class-betteranonclassnames-perl"
version: "0.002003-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/MooseX::TraitFor::Meta::Class::BetterAnonClassNames"
---

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

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

## NAME

MooseX::TraitFor::Meta::Class::BetterAnonClassNames - 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.

## SEE ALSO

Please see those modules/websites for more information 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 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 \<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
```
