From: Yuval Kogman Date: Wed, 7 Jun 2006 14:37:39 +0000 (+0000) Subject: be a bit more anal about the checking for successful load X-Git-Tag: 5.7099_04~541 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=6bfff75e6a0a42fa27a73ee23dbdf2e92c97caad be a bit more anal about the checking for successful load --- diff --git a/lib/Catalyst/Utils.pm b/lib/Catalyst/Utils.pm index ed40b02..ac20a70 100644 --- a/lib/Catalyst/Utils.pm +++ b/lib/Catalyst/Utils.pm @@ -229,7 +229,12 @@ sub ensure_class_loaded { eval "require $class"; $error = $@; } + die $error if $error; + die "require $class was successful but the package is not defined" + unless Class::Inspector->loaded($class); + + return 1; }