Basavaraj Bendigeri wrote:
> 
> use Expect;
> use IO::Tty;
> use IO::Pty;
> use Safe;
> 
>   $Expect::Debug=1;
>   $compartment = new Safe;
>   $compartment->deny(qw(print));
>   $compartment->reval(&test_func);
> 
> This is just a sample script wherein I am trying to deny
> the print function. But the print works.
> Thanks in advance for your help
> -Basavaraj

no, it doesn't work. you see your message print out because you are doing a 
function call like:

$compartment->reval(&test_func);

the '&test_func' is simply a function call so Perl calls your function 
'test_func' and prints the message. it's like you have:

&test_func;
$compartment->reval();

which of course prints your statement and make you believe that the Safe 
module doesn't work.

david


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to