12 before foo => sub { $before_ran = 1 };
13 after foo => sub { $after_ran = 1 };
15 my ($orig, $self, @rest) = @_;
29 ok(!$ModifyFoo::before_ran, 'before has not run yet');
30 ok(!$ModifyFoo::after_ran, 'after has not run yet');
31 ok(!$ModifyFoo::around_ran, 'around has not run yet');
33 ok($ModifyFoo::before_ran, 'before ran');
34 ok($ModifyFoo::after_ran, 'after ran');
35 ok($ModifyFoo::around_ran, 'around ran');
38 package ModifyMultiple;
42 before 'foo', 'bar' => sub {
48 with 'ModifyMultiple';
55 my $pre = $ModifyMultiple::before;
57 is $ModifyMultiple::before, $pre+1, "before applies to first of multiple subs";
59 is $ModifyMultiple::before, $pre+2, "before applies to second of multiple subs";