From: Graham Knop Date: Thu, 16 Jan 2014 18:26:10 +0000 (-0500) Subject: better error handling for bad versions X-Git-Tag: v1.999_001~1^2~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a97f64c71c45ac0fd5c85472978ac4fc2d9f4188;p=p5sagit%2Fstrictures.git better error handling for bad versions --- diff --git a/lib/strictures.pm b/lib/strictures.pm index f14f7e9..64ddd44 100644 --- a/lib/strictures.pm +++ b/lib/strictures.pm @@ -44,7 +44,8 @@ sub _enable { if !defined $version; my $method = "_enable_$version"; if (!$class->can($method)) { - die "Major version specified as $version - not supported!"; + require Carp; + Carp::croak("Major version specified as $version - not supported!"); } $class->$method($opts); }