Ariyan
Ariyan

Reputation: 15158

Running perl scripts like php without CGI

Is it possible to run Perl script in web server without using CGI?
I mean, like php scripts (run any .pl file without #!/path/to/interpreter line).
If Yes, How?

Thanks

Upvotes: 3

Views: 809

Answers (3)

itsbruce
itsbruce

Reputation: 4843

Yes. If you are using Apache, the canonical way to do this is to use mod_perl.

Note: mod_perl is more than just a Perl handler for Apache; it provides a standard interface (and many helper functions) for communicating with the webserver.

Upvotes: 2

simbabque
simbabque

Reputation: 54371

Take a look at PSGI/Plack. It's Perl <--> web server without CGI.

PSGI is an interface between Perl web applications and web servers, and Plack is a Perl module and toolkit that contains PSGI middleware, helpers and adapters to web servers.

PSGI and Plack are inspired by Python's WSGI and Ruby's Rack.

Upvotes: 5

Tudor Constantin
Tudor Constantin

Reputation: 26871

yes, with the Action directive:

AddHandler perl-files .pl
Action perl-files /path/to/perl/interpreter

Upvotes: 4

Related Questions