24 around qr/bark.*/ => sub {
25 'Dog::around(' . $_[0]->() . ')';
31 is( $dog->bark_once, 'Dog::around(bark)', 'around modifier is called' );
32 is( $dog->bark_twice, 'Dog::around(barkbark)', 'around modifier is called' );
38 our $BEFORE_BARK_COUNTER = 0;
39 our $AFTER_BARK_COUNTER = 0;
50 before qr/bark.*/ => sub {
51 $BEFORE_BARK_COUNTER++;
54 after qr/bark.*/ => sub {
55 $AFTER_BARK_COUNTER++;
62 is( $Cat::BEFORE_BARK_COUNTER, 1, 'before modifier is called once' );
63 is( $Cat::AFTER_BARK_COUNTER, 1, 'after modifier is called once' );
65 is( $Cat::BEFORE_BARK_COUNTER, 2, 'before modifier is called twice' );
66 is( $Cat::AFTER_BARK_COUNTER, 2, 'after modifier is called twice' );
73 before qr/bark.*/ => sub {};
74 }, undef, '... this is not currently supported' );
77 around qr/bark.*/ => sub {};
78 }, undef, '... this is not currently supported' );
81 after qr/bark.*/ => sub {};
82 }, undef, '... this is not currently supported' );