I have just released Safe::World 0.02. Thanks to liz to help with the tests and to report bugs.

Safe::World was tested with:

  • Perl-5.8.1 Win32|Linux|FreeBSD
  • Perl-5.8.2 Win32|Linux|FreeBSD|MacOSX
  • Perl-5.6.1 Win32|Linux
  • Perl-5.6.2 Win32
  • (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

    Title:
    Use:  <p> text here (a paragraph) </p>
    and:  <code> code here </code>
    to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.