eval not needed round can, it just returns false
Tomas Doran [Wed, 6 Jul 2011 13:02:27 +0000 (14:02 +0100)]
lib/Catalyst/Service/WithContext.pm

index 433e1aa..cd560c7 100644 (file)
@@ -19,7 +19,7 @@ around 'get' => sub {
     my $instance = $self->$orig(%params);
     my $ac_sub   = $self->accept_context_sub;
 
-    if ( eval { $instance->can($ac_sub) } ) {
+    if ( $instance->can($ac_sub) ) {
         return $instance->$ac_sub( @$context );
     }