X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F103_Perl6Attribute_test.t;h=8311d0f956b44362e48b98877ae51a3cec50ffe3;hb=164bf00ba31a0c8e486033690a54fea2112fe207;hp=90772f077a77787b1ea722f318a58487da23d7ff;hpb=9ec169fe90e11be6be8ad2e2e25fa49f82ce72c2;p=gitmo%2FClass-MOP.git diff --git a/t/103_Perl6Attribute_test.t b/t/103_Perl6Attribute_test.t index 90772f0..8311d0f 100644 --- a/t/103_Perl6Attribute_test.t +++ b/t/103_Perl6Attribute_test.t @@ -1,20 +1,17 @@ -#!/usr/bin/perl - 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')); @@ -22,8 +19,8 @@ BEGIN { sub new { my $class = shift; - bless $class->meta->construct_instance() => $class; - } + $class->meta->new_object(@_); + } } my $foo = Foo->new();