Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    PersistentPerl 2.22

    Download button

    No screenshots available
    Downloads: 290  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Sam Horrocks | More programs
    Perl Artistic License / FREE
    December 17th, 2007, 23:11 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    PersistentPerl description

    PersistentPerl Perl module will speed up Perl scripts by running them persistently.

    PersistentPerl Perl module will speed up Perl scripts by running them persistently.

    SYNOPSIS

    #!/usr/bin/perperl

    ### Your Script Here. For example:
    print "Content-type: text/htmlnnHello World!n";

    ##
    ## Optionally, use the PersistentPerl module for various things
    ##

    # Create a PersistentPerl object
    use PersistentPerl;
    my $pp = PersistentPerl->new;

    # See if we are running under PersistentPerl or not.
    print "Running under perperl=", $pp->i_am_perperl ? 'yes' : 'no', "n";

    # Register a shutdown handler
    $pp->add_shutdown_handler(sub { do something here });

    # Register a cleanup handler
    $pp->register_cleanup(sub { do something here });

    # Set/get some PersistentPerl options
    $pp->setopt('timeout', 30);
    print "maxruns=", $pp->getopt('maxruns'), "n";

    PersistentPerl is a way to run perl scripts persistently, which can make them run much more quickly. A script can be made to to run persistently by changing the interpreter line at the top of the script from:

    #!/usr/bin/perl

    to

    #!/usr/bin/perperl

    After the script is initially run, instead of exiting, the perl interpreter is kept running. During subsequent runs, this interpreter is used to handle new executions instead of starting a new perl interpreter each time. A very fast frontend program, written in C, is executed for each request. This fast frontend then contacts the persistent Perl process, which is usually already running, to do the work and return the results.

    By default each perl script runs in its own Unix process, so one perl script can't interfere with another. Command line options can also be used to deal with programs that have memory leaks or other problems that might keep them from otherwise running persistently.

    PersistentPerl can be used to speed up perl CGI scripts. It conforms to the CGI specification, and does not run perl code inside the web server. Since the perl interpreter runs outside the web server, it can't cause problems for the web server itself.

    PersistentPerl also provides an Apache module so that under the Apache web server, scripts can be run without the overhead of doing a fork/exec for each request. With this module a small amount of frontend code is run within the web server - the perl interpreters still run outside the server.

    SpeedyCGI and PersistentPerl are currently both names for the same code. SpeedyCGI was the original name, but because people weren't sure what it did, the name PersistentPerl was picked as an alias. At some point SpeedyCGI will be replaced by PersistentPerl, or become a sub-class of PersistentPerl to avoid always having two distributions.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    persistent Perl | speed up Perl | Perl module | persistent | speed | Perl

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM