From c448c12411b1ba5659a08b297155d18e37301885 Mon Sep 17 00:00:00 2001 From: Aristotle Pagaltzis Date: Thu, 27 Jun 2013 11:55:13 +1000 Subject: [PATCH] [perl #117751] prevent POSIX::AUTOLOAD recursing if POSIX$(so) fails to load --- ext/POSIX/lib/POSIX.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/POSIX/lib/POSIX.pm b/ext/POSIX/lib/POSIX.pm index a7dde14..40b02ac 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/^(.*?) *=> *//) { -- 2.7.4