--- /dev/null
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+use Test::Exception;
+use Class::MOP;
+
+{
+ can_ok('Class::MOP::Class', 'meta');
+ isa_ok(Class::MOP::Class->meta->find_method_by_name('meta'),
+ 'Class::MOP::Method::Meta');
+
+ {
+ package Baz;
+ use metaclass;
+ }
+ can_ok('Baz', 'meta');
+ isa_ok(Baz->meta->find_method_by_name('meta'),
+ 'Class::MOP::Method::Meta');
+
+ my $meta = Class::MOP::Class->create('Quux');
+ can_ok('Quux', 'meta');
+ isa_ok(Quux->meta->find_method_by_name('meta'),
+ 'Class::MOP::Method::Meta');
+}
+
+{
+ {
+ package Foo;
+ use metaclass no_meta => 1;
+ }
+
+ my $meta = Class::MOP::class_of('Foo');
+ ok(!$meta->has_method('meta'), "no meta method was installed");
+ $meta->add_method(meta => sub { die 'META' });
+ lives_ok { $meta->find_method_by_name('meta') } "can do meta-level stuff";
+ lives_ok { $meta->make_immutable } "can do meta-level stuff";
+ lives_ok { $meta->class_precedence_list } "can do meta-level stuff";
+}
+
+{
+ my $meta = Class::MOP::Class->create('Bar', no_meta => 1);
+ ok(!$meta->has_method('meta'), "no meta method was installed");
+ $meta->add_method(meta => sub { die 'META' });
+ lives_ok { $meta->find_method_by_name('meta') } "can do meta-level stuff";
+ lives_ok { $meta->make_immutable } "can do meta-level stuff";
+ lives_ok { $meta->class_precedence_list } "can do meta-level stuff";
+}
+
+done_testing;
+++ /dev/null
-#!/usr/bin/env perl
-use strict;
-use warnings;
-use Test::More;
-use Test::Exception;
-use Class::MOP;
-
-{
- {
- package Foo;
- use metaclass no_meta => 1;
- }
-
- my $meta = Class::MOP::class_of('Foo');
- ok(!$meta->has_method('meta'), "no meta method was installed");
- $meta->add_method(meta => sub { die 'META' });
- lives_ok { $meta->find_method_by_name('meta') } "can do meta-level stuff";
- lives_ok { $meta->make_immutable } "can do meta-level stuff";
- lives_ok { $meta->class_precedence_list } "can do meta-level stuff";
-}
-
-{
- my $meta = Class::MOP::Class->create('Bar', no_meta => 1);
- ok(!$meta->has_method('meta'), "no meta method was installed");
- $meta->add_method(meta => sub { die 'META' });
- lives_ok { $meta->find_method_by_name('meta') } "can do meta-level stuff";
- lives_ok { $meta->make_immutable } "can do meta-level stuff";
- lives_ok { $meta->class_precedence_list } "can do meta-level stuff";
-}
-
-done_testing;