in reply to Re: Unloading a module completely
in thread Unloading a module completely
Soo, your code should be:
Or using flush:use Safe::World; my ($stdout, $stderr); my $world = Safe::World->new( stdout => \$stdout, stderr => \$stderr, ); $world->eval('print 12 ** 2, "\n";'); $world->close ; print $stdout ;
use Safe::World; my ($stdout, $stderr); my $world = Safe::World->new( stdout => \$stdout, stderr => \$stderr, flush => 1 , ); $world->eval('print 12 ** 2, "\n";'); print $stdout ;
Graciliano M. P.
"Creativity is the expression of the liberty".
|
|---|