9 # Some packages out in the wild cooperate with Moose by using goto
10 # &Moose::import. we want to make sure it still works.
25 goto &Moose::unimport;
32 MooseAlike1->import();
34 ::is( ::exception { has( 'size', is => 'bare' ) }, undef, 'has was exported via MooseAlike1' );
36 MooseAlike1->unimport();
39 ok( ! Foo->can('has'),
40 'No has sub in Foo after MooseAlike1 is unimported' );
42 'Foo has a meta method' );
43 isa_ok( Foo->meta(), 'Moose::Meta::Class' );
54 my $import = \&Moose::import;
59 my $unimport = \&Moose::unimport;
68 MooseAlike2->import();
70 ::is( ::exception { has( 'size', is => 'bare' ) }, undef, 'has was exported via MooseAlike2' );
72 MooseAlike2->unimport();
76 ok( ! Bar->can('has'),
77 'No has sub in Bar after MooseAlike2 is unimported' );
79 'Bar has a meta method' );
80 isa_ok( Bar->meta(), 'Moose::Meta::Class' );