Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: What is mod_perlite?

by scorpio17 (Canon)
on Jan 22, 2009 at 22:35 UTC ( #738344=note: print w/replies, xml ) Need Help??


in reply to Re: What is mod_perlite?
in thread What is mod_perlite?

My understanding is that mod_perlite would be a direct alternative to PHP. It would let you put perl code into your HTML files, which you could then upload to your shared-host web server (assuming they provided support via a mod_perlite apache module, similar to mod_php) and it would "just work".

Ideally, this should provide better performance that plain perl CGI, because the perl interpreter would only have to load once, when the web server starts up (just like PHP).

It would not be as powerful as mod_perl, but this is in some cases seen as a "good" thing because many (most? all?) shared-host web site admins see it as a security risk and thus don't provide it.

As a potential "PHP killer", mod_perlite has a lot of catching up to do. Most perl programmers have a low opinion of PHP and see it as an inferior programming language, and would be happy to make the switch if such an alternative were available. But I think PHP initially grew in popularity because it was considered easier to learn - a kind of "dumbed down" version of perl that non-programmers/hobbiests could use to quickly make "kewl" web pages, etc. So the notion that perl is "hard to learn" will probably remain a barrier to new user adoption.

IF the implementation hurts performance (equal or better to PHP is an obvious "must have") or IF it allows any security leaks (thus spooking would-be hosting providers) then it will never get off the ground. But I think it's a cool idea and would really love to see this succeed.

Replies are listed 'Best First'.
Re^3: What is mod_perlite?
by tirwhan (Abbot) on Jan 22, 2009 at 23:12 UTC
    It would let you put perl code into your HTML files,

    Where do you get that from? You can of course already do this today (assuming you use a module like Template::Toolkit or Mason), but that has nothing to do with the Apache module backend, it's a language feature. I don't believe mod_perlite has anything to do with templating.

    One of the reasons (I think, this is far from my main area of expertise) that mod_php offers better performance than CGI is the fact that things Perl has as modules (e.g. database drivers) are compiled into mod_php itself (that also makes mod_php a pain to install on less popular platforms, but that's not my point). So one thing that may improve performance would be to load modules at Apache startup time (which, as perrin pointed out, you can do in mod_perl and FastCGI), but I don't see that as being a major design goal of mod_perlite. And since their approach is to reinitialise the perl interpreter on every request they would conceivably also have to reload modules, thus removing much of the benefit.


    All dogma is stupid.
      It would let you put perl code into your HTML files,
      Where do you get that from?

      Well, that's the whole point. It's supposed to be dirt-simple for the web developer to use and deploy, and it doesn't get any simpler than having an html file with a little bit of perl spliced into it that gets run when you use your browser to ask to see the file. It also needs to be nearly foolproof for the average sysadmin to deploy with their apache (my understanding is that this would rule out mod_perl).

      Regarding what's compiled into or not compiled into mod_perlite, or what modules are loaded when: those are implementation issues that will probably be worked out later. Sure, it would be great if mod_perlite only reloaded modules if they've been changed. That sounds like a feature that will come later.

        Hello, whoever you are :-)

        scorpio17 wrote:
        It would let you put perl code into your HTML files,
        I wrote
        Where do you get that from?
        Anonymous Monk wrote:
        Well, that's the whole point. It's supposed to be dirt-simple for the web developer to use and deploy, and it doesn't get any simpler than having an html file with a little bit of perl...

        With all due respect, I was not asking what you thought would be easiest for web developers. I was asking where did scorpio17 (and apparently you) get the idea that mod_perlite would act as a templating engine and allow you to freely place Perl code within an HTML document. None of the things I've read about mod_perlite talk about such a feature and I do not believe it is intended to do that (as said before, you can almost certainly get mod_perlite to do this by using Template::Toolkit or HTML::Mason or the like, but that would be a feature of these modules, not mod_perlite).

        As for the rest of your post, I am still waiting to hear about a single feature that mod_perlite has which existing solutions don't.


        All dogma is stupid.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://738344]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2022-12-09 23:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?