简体   繁体   中英

How can I run Perl on web servers?

I am very new to Perl and I wonder how to run it on webservers and all. (or if it can)

The three commonest options are:

I'd recommend FastCGI for good performance without massive complication.

The new kid on the block is PSGI/Plack , which I can't comment on as I haven't found time to look at it properly.

There are various web frameworks (such as Catalyst ) which can do a lot of the heavy lifting involved in building a web application for you. Most can be accessed with more than one of the above methods (eg Catalyst supports all four).

1) cgi, infact any program can run behind the server. 2) mod-perl

You can even run Perl as a webserver :)

For eq: Continuity

use strict;
use warnings;
use Continuity;

Continuity->new->loop;

sub main {
    my $request = shift;
    $request->print( '<p>Hello world</p>' );
}

You can then looking into doing a Reverse Proxy in front of these.

/I3az/

You clearly want to use PSGI/Plack to deploy your Perl application. This is the way to go in 2010, you should not go another way.

PSGI/Plack lets you deploy the application under any webserver you like, see http://plackperl.org for details.

You'll also have to choose an application framework that supports PSGI. There are many; among them is Dancer a micro-framework designed to be as effortless as possible for the developer.

See http://dancer.sukria.net for details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM