Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

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



From: rafl [...] debian.org
Subject: Anon classes are destroyed when their meta class goes out of scope (most probable a documentation bug)
Not yet pulling in ticket creation comment
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.