actually print args in Debug plugin
[gitmo/MooseX-Runnable.git] / lib / MooseX / Runnable / Invocation / Plugin / Debug.pm
index 60db341..94e0397 100644 (file)
@@ -1,19 +1,19 @@
 package MooseX::Runnable::Invocation::Plugin::Debug;
 use Moose::Role;
-use Context::Preserve qw(preserve_context);
-
-for my $method (qw/load_class apply_scheme validate_class create_instance start_application/){
 
+for my $method (qw{
+    load_class apply_scheme validate_class
+    create_instance start_application
+  }){
     requires $method;
 
     before $method => sub {
-        my ($self, @args);
+        my ($self, @args) = @_;
         my $args = join ', ', @args;
         print "Calling $method($args)\n";
     };
 
     after $method => sub {
-        my ($next, $self, @args) = @_;
         print "Returning from $method\n";
     };
 }