Revision history for Perl extension Class-MOP.
+0.21
+ * Class::MOP::Class
+ - fixed issue where metaclasses are reaped from
+ our cache in global destruction, and so are not
+ available in DESTORY calls
+
0.20 Thurs. March 2, 2006
- removed the dependency for Clone since
we no longer to deep-cloning by default.
use Carp 'confess';
use Algorithm::C3;
-our $VERSION = '0.02';
+our $VERSION = '0.03';
use base 'Class::MOP::Class';
my $method = $_find_method->($meta, $method_name);
(defined $method) || confess "Method ($method_name) not found";
goto &$method;
- });
+ }) unless $meta->has_method('AUTOLOAD');
$meta->add_method('can' => sub {
$_find_method->($_[0]->meta, $_[1]);
- });
+ }) unless $meta->has_method('can');
return $meta;
});
use Sub::Name 'subname';
use B 'svref_2object';
-our $VERSION = '0.06';
+our $VERSION = '0.07';
# Self-introspection
my $package_name = $options{':package'};
(defined $package_name && $package_name)
|| confess "You must pass a package name";
- return $METAS{$package_name} if exists $METAS{$package_name};
+ # NOTE:
+ # return the metaclass if we have it cached,
+ # and it is still defined (it has not been
+ # reaped by DESTROY yet, which can happen
+ # annoyingly enough during global destruction)
+ return $METAS{$package_name}
+ if exists $METAS{$package_name} && defined $METAS{$package_name};
$class = blessed($class) || $class;
# now create the metaclass
my $meta;