NAME
PSA::SandBox - Run a piece of code in a SandBox
SYNOPSIS
use PSA::SandBox; my $sandbox = PSA::SandBox->new( safe => $safe ); my $result = $sandbox->do(sub { });
DESCRIPTION
PSA::SandBox runs a piece of code in a "Sand Box" - an execution environment that captures all of the code's output. The result is a PSA::SandCastle object. See PSA::SandCastle.
Note that this is not a "prison", so no use of "Safe" is automatic; if you supply a safe to the constructor it will be used, but if you don't there's nothing to stop the piece of code running amok.
This was primarily intended for ePerl style PSA pages, that print their output to STDOUT (or, more accurately, the selected filehandle).
Note: the Safe feature is not implemented yet.