6 use Test::More tests => 6;
20 bless { no_moose => "Elk" } => $class;
23 sub no_moose { $_[0]->{no_moose} }
30 has 'moose' => (is => 'ro', default => 'Foo');
34 my $super = $class->SUPER::new(@_);
35 return $class->meta->new_object('__INSTANCE__' => $super, @_);
38 __PACKAGE__->meta->make_immutable(debug => 0);
42 use metaclass 'Class::MOP::Class';
44 __PACKAGE__->meta->add_attribute('squeegee' => (accessor => 'squeegee'));
46 package Old::Bucket::Nose;
48 # see http://www.moosefoundation.org/moose_facts.htm
55 my $foo_moose = Foo::Moose->new();
56 isa_ok($foo_moose, 'Foo::Moose');
57 isa_ok($foo_moose, 'Elk');
59 is($foo_moose->no_moose, 'Elk', '... got the right value from the Elk method');
60 is($foo_moose->moose, 'Foo', '... got the right value from the Foo::Moose method');
62 lives_ok { Old::Bucket::Nose->meta->make_immutable(debug => 0); }
63 'Immutability on Moose class extending Class::MOP class ok';