From: Jonathan Rockway Date: Sun, 12 Apr 2009 04:58:45 +0000 (-0500) Subject: don't die on unknown / unavailable schemes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=26041d41ef8fba0f943231b7e292fb8104848303;p=gitmo%2FMooseX-Runnable.git don't die on unknown / unavailable schemes --- diff --git a/lib/MooseX/Runnable/Invocation.pm b/lib/MooseX/Runnable/Invocation.pm index 77e3b0b..f902511 100644 --- a/lib/MooseX/Runnable/Invocation.pm +++ b/lib/MooseX/Runnable/Invocation.pm @@ -66,9 +66,11 @@ sub apply_scheme { $self->_convert_role_to_scheme($_) } $class->calculate_all_roles; - foreach my $scheme (@schemes) { - $scheme->apply($self); - } + eval { + foreach my $scheme (@schemes) { + $scheme->apply($self); + } + }; }