1 Mar 2010 09:33
Re: Global variables not initialized in Safe
Rafael Garcia-Suarez <rgs <at> consttype.org>
2010-03-01 08:33:05 GMT
2010-03-01 08:33:05 GMT
On 1 March 2010 03:36, Tim Bunce <Tim.Bunce <at> pobox.com> wrote:
> This doesn't seem reasonable to me:
>
> $ perl -MSafe -we 'warn Safe->new->reval(q{ my <at> a=(1..5); " <at> a" })'
> Use of uninitialized value $" in join or string at (eval 5) line 1.
> 12345 at -e line 1.
>
> Sharing variables like $" isn't appropriate because it wouldn't be safe.
> But initializing them to either their default value, or the current
> value when Safe->new is called, seems reasonable.
>
> Thoughts?
The default value seems more reasonable to be, given the context --
executing untrusted, external code.
RSS Feed