{
package Foo;
- use Class::MOP 'meta';
+ use metaclass;
Foo->meta->add_attribute(Perl6Attribute->new('$.foo'));
Foo->meta->add_attribute(Perl6Attribute->new('@.bar'));
sub new {
my $class = shift;
- bless $class->meta->construct_instance(@_) => $class;
- }
+ $class->meta->new_object(@_);
+ }
}
my $foo = Foo->new();