summaryrefslogtreecommitdiff
path: root/lib/autouse.pm
diff options
context:
space:
mode:
authorAlexey Tourbin <at@altlinux.ru>2005-08-18 12:13:24 +0400
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-08-18 08:00:53 +0000
commitbc6dddacc1f7827aa418855fd57066ca3b6f5230 (patch)
tree4daced034e702b00074809308d776362472596ac /lib/autouse.pm
parentb68463f7111b76264d78b38de603c7c4a3c5e635 (diff)
downloadperl-bc6dddacc1f7827aa418855fd57066ca3b6f5230.tar.gz
autouse.pm: remove unneeded eval
Date: Thu, 18 Aug 2005 08:13:24 +0400 Message-ID: <20050818041324.GO19097@solemn.turbinal.org> Subject: autouse.pm: check stub, use goto in stub From: Alexey Tourbin <at@altlinux.ru> Date: Thu, 18 Aug 2005 09:06:20 +0400 Message-ID: <20050818050620.GP19097@solemn.turbinal.org> p4raw-id: //depot/perl@25302
Diffstat (limited to 'lib/autouse.pm')
-rw-r--r--lib/autouse.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/autouse.pm b/lib/autouse.pm
index 85db01fa90..67c4e01d1d 100644
--- a/lib/autouse.pm
+++ b/lib/autouse.pm
@@ -3,7 +3,7 @@ package autouse;
#use strict; # debugging only
use 5.003_90; # ->can, for my $var
-$autouse::VERSION = '1.04';
+$autouse::VERSION = '1.05';
$autouse::DEBUG ||= 0;
@@ -50,8 +50,7 @@ sub import {
my $load_sub = sub {
unless ($INC{$pm}) {
- eval {require $pm};
- die if $@;
+ require $pm;
vet_import $module;
}
no warnings 'redefine';
@@ -63,7 +62,8 @@ sub import {
};
if (defined $proto) {
- *$closure_import_func = eval "sub ($proto) { &\$load_sub }";
+ *$closure_import_func = eval "sub ($proto) { goto &\$load_sub }"
+ || die;
} else {
*$closure_import_func = $load_sub;
}