Commit | Line | Data |
---|---|---|
098b6cb6 | 1 | package MooseX::Runnable::Invocation::Plugin::Debug; |
2 | use Moose::Role; | |
098b6cb6 | 3 | |
00fc26d5 | 4 | for my $method (qw{ |
5 | load_class apply_scheme validate_class | |
6 | create_instance start_application | |
7 | }){ | |
098b6cb6 | 8 | requires $method; |
9 | ||
10 | before $method => sub { | |
00fc26d5 | 11 | my ($self, @args) = @_; |
098b6cb6 | 12 | my $args = join ', ', @args; |
13 | print "Calling $method($args)\n"; | |
14 | }; | |
15 | ||
16 | after $method => sub { | |
098b6cb6 | 17 | print "Returning from $method\n"; |
18 | }; | |
19 | } | |
20 | ||
21 | 1; |