in reply to Re: Prevent import of subroutines from eval (fork or exec)
in thread Prevent import of subroutines from eval

> Defining a new package name for each one is going to just keep adding memory consumption.

so what about just deleting the namespace?

DB<123> ; {package TMP; eval 'sub bla {"BLA"}'} DB<124> TMP::bla() => "BLA" DB<125> delete ${'main::'}{'TMP::'} => do { my $a = *main::TMP::; $a = { bla => *TMP::bla }; $a; } DB<126> TMP::bla() Undefined subroutine &TMP::bla called at (eval 72)[multi_perl5db.pl:64 +4] line 2.

Cheers Rolf

( addicted to the Perl Programming Language)