use strict;
use warnings;
+use Class::MOP::Instance;
+use Class::MOP::Method::Wrapped;
+
use Carp 'confess';
use Scalar::Util 'blessed', 'reftype', 'weaken';
use Sub::Name 'subname';
use B 'svref_2object';
-our $VERSION = '0.20';
+our $VERSION = '0.21';
our $AUTHORITY = 'cpan:STEVAN';
use base 'Class::MOP::Module';
-use Class::MOP::Instance;
-
# Self-introspection
sub meta { Class::MOP::Class->initialize(blessed($_[0]) || $_[0]) }
: blessed($class))
: $class);
- $class = blessed($class) || $class;
# now create the metaclass
my $meta;
if ($class =~ /^Class::MOP::Class$/) {
sub is_anon_class {
my $self = shift;
+ no warnings 'uninitialized';
$self->name =~ /^$ANON_CLASS_PREFIX/ ? 1 : 0;
}
# really need to be handled explicitly
sub DESTROY {
my $self = shift;
+ no warnings 'uninitialized';
return unless $self->name =~ /^$ANON_CLASS_PREFIX/;
my ($serial_id) = ($self->name =~ /^$ANON_CLASS_PREFIX(\d+)/);
no strict 'refs';