Stas Bekman wrote:
[...]
It's handy to have p5p people sitting next to you. Just asked this
question Tim Bunce, and he replied:
"Safe is a failed experiment. It works only for several cases.
TIEHANDLE is
not one of them [print under mod_perl uses a tied STDOUT]. Do not use
it if
it doesn'
Joel Palmius wrote:
Ah, well, after a five hours of experimentation I thought up a working
workaround anyway.
This works with an unpatched version of mp1 ($substr is any perl code
fetched from external source):
my(@ops) = split(/\x0a/,$substr);
my($cell,$reval);
foreach $cell (@
Ah, well, after a five hours of experimentation I thought up a working
workaround anyway.
This works with an unpatched version of mp1 ($substr is any perl code
fetched from external source):
my(@ops) = split(/\x0a/,$substr);
my($cell,$reval);
foreach $cell (@ops)
{
Stas Bekman wrote:
Joel Palmius wrote:
use Safe;
my($compartment) = new Safe;
$compartment->permit(qw(:browse));
$compartment->reval("print \"gnu\n\";");
[...]
Request results in segfault:
[Thu Jul 24 12:59:56 2003] [notice] child pid 3003 exit signal
Segmentation fault (11)
[...]
Joel Palmius wrote:
This works, separate file /tmp/test.pl:
use Safe;
my($compartment) = new Safe;
$compartment->permit(qw(:browse));
$compartment->reval("print \"gnu\n\";");
if($@)
{
die $@;
}
print "\n\n";
(Script prints "gnu")
This does not work, in perl-handler Handler.p
This works, separate file /tmp/test.pl:
use Safe;
my($compartment) = new Safe;
$compartment->permit(qw(:browse));
$compartment->reval("print \"gnu\n\";");
if($@)
{
die $@;
}
print "\n\n";
(Script prints "gnu")
This does not work, in perl-handler Handler.pm:
[...]
use