*** a/src/pl/plperl/plperl.c
--- b/src/pl/plperl/plperl.c
***************
*** 283,295 **** _PG_init(void)
  	"&_plperl_to_pg_array " \
  	"&DEBUG &LOG &INFO &NOTICE &WARNING &ERROR %_SHARED ]);" \
  	"sub ::mksafefunc {" \
! 	"      my $ret = $PLContainer->reval(qq[sub { $_[0] $_[1] }]); " \
! 	"      $@ =~ s/\\(eval \\d+\\) //g if $@; return $ret; }" \
  	"$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; }"
  
  #define SAFE_BAD \
  	"use vars qw($PLContainer); $PLContainer = new Safe('PLPerl');" \
--- 283,299 ----
  	"&_plperl_to_pg_array " \
  	"&DEBUG &LOG &INFO &NOTICE &WARNING &ERROR %_SHARED ]);" \
  	"sub ::mksafefunc {" \
! 	"      my $__ExPr__ = $PLContainer->reval(qq[sub { $_[0] $_[1] }]); " \
! 	"      $@ =~ s/\\(eval \\d+\\) //g if $@; " \
! 	"      my $sub = eval 'package '. $PLContainer->{Root} .'; sub { @_=(); $__ExPr__->(); }'; " \
! 	"      return sub { Opcode::_safe_call_sv($PLContainer->{Root}, $PLContainer->{Mask}, $sub); }; } "\
  	"$PLContainer->permit(qw[require caller]); $PLContainer->reval('use strict;');" \
  	"$PLContainer->deny(qw[require caller]); " \
  	"sub ::mk_strict_safefunc {" \
! 	"      my $__ExPr__ = $PLContainer->reval(qq[sub { BEGIN { strict->import(); } $_[0] $_[1] }]); " \
! 	"      $@ =~ s/\\(eval \\d+\\) //g if $@; "\
! 	"      my $sub = eval 'package '. $PLContainer->{Root} .'; sub { @_=(); $__ExPr__->(); }'; " \
! 	"      return sub { Opcode::_safe_call_sv($PLContainer->{Root}, $PLContainer->{Mask}, $sub); }; }"
  
  #define SAFE_BAD \
  	"use vars qw($PLContainer); $PLContainer = new Safe('PLPerl');" \
