sub get_meta_instance {
my $class = shift;
- $class->{':instance_meta_object_cache'} ||= $class->instance_metaclass->new($class);
+ return $class->instance_metaclass->new(
+ $class,
+ $class->compute_all_applicable_attributes()
+ );
}
sub clone_object {
}
sub new {
- my ($class, $meta) = @_;
- my $slots = $class->_compute_slot_list_from_class($meta);
+ my ($class, $meta, @attrs) = @_;
+ my @slots = map { $_->name } @attrs;
bless {
meta => $meta,
- slots => $slots,
+ slots => \@slots,
} => $class;
}
-# private for now ...
-sub _compute_slot_list_from_class {
- my ($self, $meta) = @_;
- return [
- map {
- $_->name
- } $meta->compute_all_applicable_attributes()
- ];
-}
-
sub create_instance {
my $self = shift;
$self->bless_instance_structure({});