Build.PL
Changes
-META.yml
Makefile.PL
+META.yml
MANIFEST
MANIFEST.SKIP
README
lib/Class/MOP.pm
lib/Class/MOP/Attribute.pm
lib/Class/MOP/Class.pm
+lib/Class/MOP/Immutable.pm
lib/Class/MOP/Instance.pm
lib/Class/MOP/Method.pm
lib/Class/MOP/Module.pm
lib/Class/MOP/Object.pm
lib/Class/MOP/Package.pm
-lib/Class/MOP/Class/Immutable.pm
lib/Class/MOP/Method/Accessor.pm
lib/Class/MOP/Method/Constructor.pm
lib/Class/MOP/Method/Wrapped.pm
use Class::MOP::Immutable;
-our $VERSION = '0.36';
+our $VERSION = '0.37_001';
our $AUTHORITY = 'cpan:STEVAN';
{
);
Class::MOP::Method::Constructor->meta->add_attribute(
- Class::MOP::Attribute->new('$!metaclass' => (
+ Class::MOP::Attribute->new('$!associated_metaclass' => (
init_arg => 'metaclass',
+ reader => {
+ 'associated_metaclass' => \&Class::MOP::Method::Constructor::associated_metaclass
+ },
))
);
(exists $options{options} && ref $options{options} eq 'HASH')
|| confess "You must pass a hash of options";
-
- (blessed $options{metaclass} && $options{metaclass}->isa('Class::MOP::Class'))
- || confess "You must pass a metaclass instance";
my $self = bless {
# from our superclass
'&!body' => undef,
# specific to this subclass
- '$!metaclass' => $options{metaclass},
- '%!options' => $options{options},
+ '%!options' => $options{options},
+ '$!meta_instance' => $options{metaclass}->get_meta_instance,
+ '@!attributes' => [ $options{metaclass}->compute_all_applicable_attributes ],
+ # ...
+ '$!associated_metaclass' => $options{metaclass},
} => $class;
# we don't want this creating
# a cycle in the code, if not
# needed
- weaken($self->{'$!metaclass'});
+# weaken($self->{'$!meta_instance'});
+ weaken($self->{'$!associated_metaclass'});
$self->intialize_body;
## accessors
-sub options { (shift)->{'%!options'} }
-sub meta_instance { (shift)->{'$!metaclass'}->get_meta_instance }
-sub attributes { [ (shift)->{'$!metaclass'}->compute_all_applicable_attributes ] }
+sub options { (shift)->{'%!options'} }
+sub meta_instance { (shift)->{'$!meta_instance'} }
+sub attributes { (shift)->{'@!attributes'} }
+
+sub associated_metaclass { (shift)->{'$!associated_metaclass'} }
## method
=item B<meta_instance>
+=item B<associated_metaclass>
+
=item B<options>
=item B<intialize_body>