On Thu, Feb 18, 2010 at 11:09, Tim Bunce <Tim.Bunce@pobox.com> wrote:
> The key line is:
>
> =C2=A0 =C2=A0*PLPerl::utf8::SWASHNEW =3D \&utf8::SWASHNEW;
Hrm... It seems to work for me in HEAD and AFAICS we dont have that
line. Did I just miss it? Or did you happen to fix it in another way
with your refactoring?
Another Idea that comes to mind would be instead of (in ::mksafefunc):
my $subref =3D ->reval(sub {} );
$subref->();
do:
my $subref =3D ->reval(sub {});
return sub { ->reval("$subreb->();"); }
or something...
I did a few quick tests but it failed miserably for me... Im also not
fond of adding yet another closure. :)
> This allows the perl regex logic to call the SWASHNEW method that's
> called when information from the Unicode character database is needed.
> (The lack of that method was causing the regex logic to think that the
> utf8 module wasn't loaded, so it would try to 'require' it but fail due
> to the restrictions of the Safe compartment.)
Makes me think we might just be able to share some of utf8 package in the s=
afe?
> The rest of the patch is updates the surrounding code to the same
> simplified 'utf8fix' logic used in PostgreSQL 9.0, and the same Safe
> version checks.
=46rom a quick look it looks ok.