Skip Menu |

This queue is for tickets about the Class-MOP CPAN distribution.

Report information
The Basics
Id: 24214
Status: resolved
Priority: 0/
Queue: Class-MOP

People
Owner: stevan.little [...] gmail.com
Requestors: willert [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Anon classes are destroyed when their meta class goes out of scope (most probable a documentation bug)
The docs for Class::MOP::Class->create_anon_class state: This will create an anonymous class, it works much like "create" but it does not need a $package_name. Instead it will create a suitably unique package name for you to stash things into. This is misleading, as there is another vital difference: anon classes are destroyed (at least in my setup) when their meta class goes out of scope, thus leading to very strange bugs down the road if you are not aware of this behavior.
The documentation has been updated in (the soon to be released) 0.38.