You are not logged in.

#1 2009-07-26 20:24:42

poopship21
Member
Registered: 2009-05-13
Posts: 177

mod_perl or 'perl via php' [SOLVED]

i am interested to hear any comments on the strengths and weaknesses of these two approaches.  i have done some web develpment with php and some desktop development with perl.  in both cases my experience is quite limited.  however i need to use perl for regex and the handy bioperl modules in a web-based bioinformatics project that i am currently working on.  TIA

Last edited by poopship21 (2009-08-02 17:17:35)

Offline

#2 2009-07-28 04:55:08

juster
Forum Fellow
Registered: 2008-10-07
Posts: 195

Re: mod_perl or 'perl via php' [SOLVED]

These two things are very different.  mod_perl is very powerful and very fast.  You must also program differently for it.  mod_perl programs do not stop running in a sense.  They stay loaded in order to skip the compilation stage, which slows down perl.  mod_perl also gives you direct access to Apache's internals.

I assume when you say 'perl via php' you mean calling perl with a system call from php.  This is much, much slower to execute.  Also if you do this PLEASE escape all shell characters.  I have seen this done haphazardly, which opens a security hole and allows remote attackers to run commands if they figure out what you are doing.

Personally I would ditch PHP and make it all with perl cgi before I would do 'perl via php'.  You might look at the Catalyst framework which works with mod_perl and/or fastcgi.  Catalyst may be too hard and too much for a newcomer, but if you are serious it is worth it. CGI::Application is a simpler and older alternative.

Your choice also depends on whether your hosting provider provides mod_perl and easy installation of modules.

Offline

#3 2009-07-29 11:44:33

fumbles
Member
Registered: 2006-12-22
Posts: 246

Re: mod_perl or 'perl via php' [SOLVED]

Doesn't php have it's own regex features with perl style regex too?

Offline

#4 2009-07-30 17:47:41

poopship21
Member
Registered: 2009-05-13
Posts: 177

Re: mod_perl or 'perl via php' [SOLVED]

yeah ive just looked into that and it appears that a form of perl re  (PCRE) is available in php

Offline

Board footer

Powered by FluxBB