http://www.perlmonks.org?node_id=1008161


in reply to Re: Perl and PHP
in thread Perl and PHP

Thanks, I will for sure look into it. However, I will be able to actually create my DB class with perl and communicate with the CGI module? What I wanted to do is create my pages in php and use some perl for functions to handle the Dababase structure. For me, perl is really good with hashes ref. Php, not so much..

Replies are listed 'Best First'.
Re^3: Perl and PHP
by davido (Cardinal) on Dec 10, 2012 at 20:59 UTC

    Mojolicious::Lite!!! If you really want to do most of your work in the templates (as is done in a typical PHP script), you can do that here too. But it really supports (and encourages) a more healthy separation of concerns. Take a look at the docs and see if it's a good fit.


    Dave

Re^3: Perl and PHP
by CountZero (Bishop) on Dec 11, 2012 at 07:37 UTC
    Running PHP and Perl in one webpage will surely degrade the performance of the webserver. For each call to a Perl-routine from PHP, the web-server will have to start a new instance of Perl. Multiply that with the number of pages that can get simultaneously accessed and the performance crawls down to a halt.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics