safe-module and namespaces




I try to use the safe-module to evaluate user-provided code, but it seems there is a knot in my brain.

use Safe;
$s=new Safe "xxx";
$xxx::x=3;
$s->reval('$x=4');
print $xxx::x,"\n"


Well, this prints out 3 as result and I think it should be 4!
What am I not thinking of?

thnx,
peter
.



Relevant Pages

  • Re: safe-module and namespaces
    ... Brian McCauley wrote: ... seems there is a knot in my brain. ... use Safe; ...
    (comp.lang.perl.misc)
  • Re: safe-module and namespaces
    ... peter pilsl wrote: ... seems there is a knot in my brain. ... I suspect package variables seen outside the safe ...
    (comp.lang.perl.misc)
  • Re: safe-module and namespaces
    ... peter pilsl wrote: ... seems there is a knot in my brain. ... use Safe; ...
    (comp.lang.perl.misc)
  • Re: Scripted series this summer?
    ... Watching MTV rots your brain (and your morals), ... So it's safe for Ubiquitous then. ... Yeah, I'd be voting Democrat and getting my news from Michael Moore ...
    (rec.arts.tv)
  • Re: Scripted series this summer?
    ... Watching MTV rots your brain (and your morals), ... So it's safe for Ubiquitous then. ... Yeah, I'd be voting Democrat and getting my news from Michael Moore ...
    (rec.arts.tv)