From: Shawn M Moore Date: Sun, 28 Sep 2008 15:18:50 +0000 (+0000) Subject: We don't need to do both eval and Module::Name -> Module/Name.pm munging X-Git-Tag: 0.19~199 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4d02abfd8675caf8cf09e5c29223ac7bcf24aaa3;p=gitmo%2FMouse.git We don't need to do both eval and Module::Name -> Module/Name.pm munging --- diff --git a/lib/Mouse/Util.pm b/lib/Mouse/Util.pm index a0bf463..967b784 100644 --- a/lib/Mouse/Util.pm +++ b/lib/Mouse/Util.pm @@ -124,11 +124,9 @@ our %dependencies = ( our @EXPORT_OK = map { keys %$_ } values %dependencies; for my $module_name (keys %dependencies) { - (my $file = "$module_name.pm") =~ s{::}{/}g; - my $loaded = do { local $SIG{__DIE__} = 'DEFAULT'; - eval "require '$file'; 1"; + eval "require $module_name; 1"; }; for my $method_name (keys %{ $dependencies{ $module_name } }) {