Safe::World was tested with:
(For who haven't read the previous post:)
What is Safe::World?
With Safe world you can create a Safe compartment fully implemented, in other words a compartment that works like a normal Perl interpreter, but that doesn't make changes to the main interpreter. Soo, you can create multiple Safe::World objects (let's just call World) that can't change the main interpreter, and each World has their own output target (STDOUT, STDERR). The output can be redirected to another glob/filehandler, scalar or sub (CODE).
Each World has a headers handler too (HEADOUT) implemented inside STDOUT, soo if you want to run CGI inside it you can have the content separeted automatically from the headers.
Assembling Worlds:
The most interesting thing of Safe::World is the ability to assemble them. Soo you can create 2 separeted Worlds, link them and run them like if they are only one.
This is goo to have the general classes of a Site in one World, and the code of the pages (scripts) in other World. Soo this can be used to cache the classes (PerlModules) that you load all the time in one World, load the page script in other World, link them, and run. Then after this you can unlink the 2 Worlds and DESTROY the World with the script without destroy the classes. And in the next script to run you already have the classes loaded in one World, soo you just link again, and again, and again...
This is specially projected to work with mod_perl, because will save time and memory in the server, what means save money!
Get it at:
http://cpan.org/authors/id/G/GM/GMPASSOS/Safe-World-0.02.tar.gz
Enjoy, and please test it and report bugs! ;-P
Graciliano M. P.
"Creativity is the expression of the liberty".
In reply to Safe::World 0.02 released - Safe compartments as a full interpreter, and class (pm) CACHE. Now working with mod_perl! by gmpassos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |