use strict;
use warnings;
-use Test::More tests => 10;
+use Test::More tests => 9;
use File::Spec;
-BEGIN {
- use_ok('Class::MOP');
- require_ok(File::Spec->catdir('examples', 'Perl6Attribute.pod'));
+BEGIN {use Class::MOP;
+ require_ok(File::Spec->catfile('examples', 'Perl6Attribute.pod'));
}
{
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();