Work around for perl 5.10 bug - fix due to perl hacker Simon Cozens.
authorAndrew Dunstan <[email protected]>
Tue, 22 Jan 2008 20:19:53 +0000 (20:19 +0000)
committerAndrew Dunstan <[email protected]>
Tue, 22 Jan 2008 20:19:53 +0000 (20:19 +0000)
src/pl/plperl/plperl.c

index c675b293f48be754223233b2ed6fc1cfaae13eb8..8e81771f6d600b1ec171840d65f16a44272fc5da 100644 (file)
@@ -271,8 +271,8 @@ _PG_init(void)
        "sub ::mksafefunc {" \
        "      my $ret = $PLContainer->reval(qq[sub { $_[0] $_[1] }]); " \
        "      $@ =~ s/\\(eval \\d+\\) //g if $@; return $ret; }" \
-       "$PLContainer->permit('require'); $PLContainer->reval('use strict;');" \
-       "$PLContainer->deny('require');" \
+       "$PLContainer->permit(qw[require caller]); $PLContainer->reval('use strict;');" \
+       "$PLContainer->deny(qw[require caller]); " \
        "sub ::mk_strict_safefunc {" \
        "      my $ret = $PLContainer->reval(qq[sub { BEGIN { strict->import(); } $_[0] $_[1] }]); " \
        "      $@ =~ s/\\(eval \\d+\\) //g if $@; return $ret; }"