use strict;
use warnings;
-use Test::More no_plan => 1;
+use Test::More;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
{
package My::Role;
use Moose::Role;
-
- around 'baz' => sub {
+
+ around 'baz' => sub {
my $next = shift;
'My::Role::baz(' . $next->(@_) . ')';
};
{
package Foo;
use Moose;
-
+
sub baz { 'Foo::baz' }
-
- __PACKAGE__->meta->make_immutable(debug => 0);
+
+ __PACKAGE__->meta->make_immutable(debug => 0);
}
my $foo = Foo->new;
is($foo->baz, 'My::Role::baz(Foo::baz)', '... got the right value');
-
+done_testing;