[ic] Safe: Require issues or perl-vs-calc throwdown
Marty Tennison
marty at dripdepot.com
Wed May 27 20:21:52 UTC 2009
Mike Heins wrote:
> Quoting Marty Tennison (marty at dripdepot.com):
>
>> Perl 5.8.8
>> IC 5.6.1
>>
>> I'm getting an increasing number of errors in my error log related to
>> 'safe' and 'require'. I've searched the mail list archives and it
>> appears that others are experiencing a similar issue. Here is an
>> example of what I am seeing....
>>
>> This does NOT work.... (in lib/UI/pages/include/Options/Matrix)
>>
>> [calc]
>> $Scratch->{built_js} =~ s/_NEXT_[A-Z]+_//g;
>> return;
>> [/calc]
>>
>> This DOES work....
>>
>> [perl global=1]
>> $Scratch->{built_js} =~ s/_NEXT_[A-Z]+_//g;
>> return;
>> [/perl]
>>
>> The error generated is usually something like this.....
>>
>> Safe: 'require' trapped by operation mask at (tag 'calc') line 20.
>>
>> I'm experiencing other issues similar to this where I have to enclose
>> certain blocks in perl rather than calc and the solution does not always
>> work.
>>
>> Once again, I'm stumped. I've tried everything from...
>>
>> 1) SafeUntrap require (and lots more)
>> 2) to moving the code around the page...
>> 3) upgrading, downgrading perl modules...
>>
>> Has anyone ran into this and solved it?
>>
>
> This is UTF-8 related. People are having this problem everywhere with
> the latest IC. The problem is that Encode.pm pollutes regexes with
> runtime requires, prints, and other absurdities.
>
> There is a fix in the latest nightly build, where you set the environment
> variable MINIVEND_DISABLE_UTF8 before restarting the server. You can't use
> UTF8, but you don't have the safe problems.
>
> You can also try doing a
>
> SafeUntrap require print entereval caller
>
> and seeing what happens, but the problems seem pervasive to me and
> that may not get it all.
>
>
interchange-5.7.1-200905270658
Thanks Mike, I gave that a try, so far it looks promising. (with one
hiccup)
For future reference, here are the steps I took to get it working.
<in my .profile I added>
export MINIVEND_DISABLE_UTF8=1
<then I sourced my profile>
. ~/.profile
<start interchange>
and I got this message.....
Bareword "Encode::FB_CROAK" not allowed while "strict subs" in use at
/usr/local/interchange/lib/Vend/CharSet.pm line 66.
Edited CharSet.pm and commented out 'use strict'
<start interchange>
Everything seems to be working wonderfully!!!! I'm going to do some
more testing and report back.
--
- - -- ---- ---------------------------- --- -- - -
Marty Tennison
web: www.dripdepot.com
- -- --- --------------------------------------- --- --
More information about the interchange-users
mailing list