You are not logged in.
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
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
Doesn't php have it's own regex features with perl style regex too?
Offline
yeah ive just looked into that and it appears that a form of perl re (PCRE) is available in php
Offline