4 use Test::More tests => 2;
9 package MyRole::LogMethod;
10 use MooseX::Role::Parameterized;
21 before $p->method => sub {
22 push @calls, "calling " . $p->method
25 after $p->method => sub {
26 push @calls, "called " . $p->method
29 around $p->method => sub {
35 push @calls, "took " . ($end - $start) . " seconds";
43 with 'MyRole::LogMethod' => {
48 is_deeply([splice @calls], [], "no calls yet");
50 is_deeply([splice @calls], ["calling new", "took 0 seconds", "called new"], "instrumented new");