4 use Test::More tests => 2;
9 package MyRole::LogMethod;
10 use MooseX::Role::Parameterized;
20 before $p->method => sub {
21 push @calls, "calling " . $p->method
24 after $p->method => sub {
25 push @calls, "called " . $p->method
28 around $p->method => sub {
34 push @calls, "took " . ($end - $start) . " seconds";
42 with 'MyRole::LogMethod' => {
47 is_deeply([splice @calls], [], "no calls yet");
49 is_deeply([splice @calls], ["calling new", "took 0 seconds", "called new"], "instrumented new");