fixed all the attribute name to be more Perl6ish and then removed the : in the init_a...
[gitmo/Class-MOP.git] / t / 006_new_and_clone_metaclasses.t
index 6e972d9..b30e03b 100644 (file)
@@ -15,7 +15,7 @@ BEGIN {
 my $meta = Class::MOP::Class->meta();
 isa_ok($meta, 'Class::MOP::Class');
 
-my $new_meta = $meta->new_object(':package' => 'Class::MOP::Class');
+my $new_meta = $meta->new_object('package' => 'Class::MOP::Class');
 isa_ok($new_meta, 'Class::MOP::Class');
 is($new_meta, $meta, '... it still creates the singleton');
 
@@ -33,7 +33,7 @@ is($cloned_meta, $meta, '... it creates the singleton even if you try to clone i
 my $foo_meta = Foo->meta;
 isa_ok($foo_meta, 'Class::MOP::Class');
 
-is($meta->new_object(':package' => 'Foo'), $foo_meta, '... got the right Foo->meta singleton');
+is($meta->new_object('package' => 'Foo'), $foo_meta, '... got the right Foo->meta singleton');
 is($meta->clone_object($foo_meta), $foo_meta, '... cloning got the right Foo->meta singleton');
     
 # make sure subclassed of Class::MOP::Class do the right thing
@@ -46,7 +46,7 @@ is($meta->clone_object($foo_meta), $foo_meta, '... cloning got the right Foo->me
 my $my_meta = MyMetaClass->meta;
 isa_ok($my_meta, 'Class::MOP::Class');
 
-my $new_my_meta = $my_meta->new_object(':package' => 'MyMetaClass');
+my $new_my_meta = $my_meta->new_object('package' => 'MyMetaClass');
 isa_ok($new_my_meta, 'Class::MOP::Class');
 is($new_my_meta, $my_meta, '... even subclasses still create the singleton');
 
@@ -54,12 +54,12 @@ my $cloned_my_meta = $meta->clone_object($my_meta);
 isa_ok($cloned_my_meta, 'Class::MOP::Class');
 is($cloned_my_meta, $my_meta, '... and subclasses creates the singleton even if you try to clone it');
 
-is($my_meta->new_object(':package' => 'Foo'), $foo_meta, '... got the right Foo->meta singleton (w/subclass)');
+is($my_meta->new_object('package' => 'Foo'), $foo_meta, '... got the right Foo->meta singleton (w/subclass)');
 is($meta->clone_object($foo_meta), $foo_meta, '... cloning got the right Foo->meta singleton (w/subclass)');
 
 # now create a metaclass for real
 
-my $bar_meta = $my_meta->new_object(':package' => 'Bar');
+my $bar_meta = $my_meta->new_object('package' => 'Bar');
 isa_ok($bar_meta, 'Class::MOP::Class');
 
 is($bar_meta->name, 'Bar', '... got the right name for the Bar metaclass');
@@ -78,7 +78,7 @@ my $baz_meta = Baz->meta;
 isa_ok($baz_meta, 'Class::MOP::Class');
 isa_ok($baz_meta, 'MyMetaClass');
 
-is($my_meta->new_object(':package' => 'Baz'), $baz_meta, '... got the right Baz->meta singleton');
+is($my_meta->new_object('package' => 'Baz'), $baz_meta, '... got the right Baz->meta singleton');
 is($my_meta->clone_object($baz_meta), $baz_meta, '... cloning got the right Baz->meta singleton');
 
 $baz_meta->superclasses('Bar');