summaryrefslogtreecommitdiff
path: root/ext/POSIX
diff options
context:
space:
mode:
authorAristotle Pagaltzis <pagaltzis@gmx.de>2013-06-27 11:55:13 +1000
committerTony Cook <tony@develop-help.com>2013-06-27 12:07:33 +1000
commitc448c12411b1ba5659a08b297155d18e37301885 (patch)
tree76e46717b937e7284a11370bc1b2155701a4c2cf /ext/POSIX
parenteb387cb8e5146f6b88b5251736da23e4d2ffb844 (diff)
downloadperl-c448c12411b1ba5659a08b297155d18e37301885.tar.gz
[perl #117751] prevent POSIX::AUTOLOAD recursing if POSIX$(so) fails to load
Diffstat (limited to 'ext/POSIX')
-rw-r--r--ext/POSIX/lib/POSIX.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/POSIX/lib/POSIX.pm b/ext/POSIX/lib/POSIX.pm
index a7dde14981..40b02aca95 100644
--- a/ext/POSIX/lib/POSIX.pm
+++ b/ext/POSIX/lib/POSIX.pm
@@ -4,7 +4,7 @@ use warnings;
our ($AUTOLOAD, %SIGRT);
-our $VERSION = '1.33';
+our $VERSION = '1.34';
require XSLoader;
@@ -188,6 +188,8 @@ eval join ';', map "sub $_", keys %replacement, keys %reimpl;
sub AUTOLOAD {
my ($func) = ($AUTOLOAD =~ /.*::(.*)/);
+ die "POSIX.xs has failed to load\n" if $func eq 'constant';
+
if (my $code = $reimpl{$func}) {
my ($num, $arg) = (0, '');
if ($code =~ s/^(.*?) *=> *//) {