diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-13 09:51:43 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-13 09:51:43 +0000 |
commit | 36c2d1652e2db3216e1143788ffc974008de20fa (patch) | |
tree | 08ddb7724378996a46838002d4f74e95aef1bb50 /ext/Fcntl/Fcntl.pm | |
parent | ae5c130cf43baa916c1292cd85a40d054824ba20 (diff) | |
download | perl-36c2d1652e2db3216e1143788ffc974008de20fa.tar.gz |
[win32] merge change#681 from maintbranch
p4raw-link: @681 on //depot/maint-5.004/perl: ca1e21bae662c1cebe4e218dc45cb163ecf67263
p4raw-id: //depot/win32/perl@927
Diffstat (limited to 'ext/Fcntl/Fcntl.pm')
-rw-r--r-- | ext/Fcntl/Fcntl.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/Fcntl/Fcntl.pm b/ext/Fcntl/Fcntl.pm index 74de3dfc65..ab19670af7 100644 --- a/ext/Fcntl/Fcntl.pm +++ b/ext/Fcntl/Fcntl.pm @@ -76,9 +76,8 @@ $VERSION = "1.03"; ); sub AUTOLOAD { - my($constname); - ($constname = $AUTOLOAD) =~ s/.*:://; - my $val = constant($constname, (@_ && (caller(0))[4]) ? $_[0] : 0); + (my $constname = $AUTOLOAD) =~ s/.*:://; + my $val = constant($constname, 0); if ($! != 0) { if ($! =~ /Invalid/) { $AutoLoader::AUTOLOAD = $AUTOLOAD; @@ -90,7 +89,7 @@ sub AUTOLOAD { "; } } - eval "sub $AUTOLOAD { $val }"; + *$AUTOLOAD = sub { $val }; goto &$AUTOLOAD; } |