{
package Foo;
- use strict;
- use warnings;
use Moose;
sub foo { 'Foo::foo' }
sub baz { 'Foo::baz' }
package Bar;
- use strict;
- use warnings;
use Moose;
extends 'Foo';
override bar => sub { 'Bar::bar -> ' . super() };
package Baz;
- use strict;
- use warnings;
use Moose;
extends 'Bar';
override bar => sub { 'Baz::bar -> ' . super() };
override baz => sub { 'Baz::baz -> ' . super() };
+
+ no Moose; # ensure super() still works after unimport
}
my $baz = Baz->new();
{
package Bling;
- use strict;
- use warnings;
use Moose;
sub bling { 'Bling::bling' }
package Bling::Bling;
- use strict;
- use warnings;
use Moose;
extends 'Bling';