in reply to Perl mindshare in web development

Why would I care what Slashdot says? I go here, not there. That having been said, PHP's ease of use means that most people are going to start with it rather than Perl, and even experienced Perl programmers may use it for small things, rather than going to the bother of messing with templates. The single best thing that could be done to popularize Perl to the masses would be to make Perl code embeddable in pages:
My rocket ship goes:<br> <?perl print join ' ', reverse 'BLAST OFF!', 0..10; ?>
This sort of format is really the only thing that makes PHP popular. If Perl could do that, I'd never touch PHP again. Also, someone needs to make an extended Perl install (and updater) that includes all the most popular modules not included in the standard install. Installing and updating modules can be a painful process, and programmers shouldn't have to worry about that side of things.

Replies are listed 'Best First'.
Re^2: Perl mindshare in web development
by merlyn (Sage) on May 19, 2006 at 22:51 UTC
Re^2: Perl mindshare in web development
by CountZero (Bishop) on May 20, 2006 at 14:34 UTC
    Then have a look at the Template Toolkit, which allows you to do:
    My rocket ship goes:<br> [% PERL %] print join ' ', reverse 'BLAST OFF!', 0..10; [% END %]
    You don't even have to lear the Template Toolkit language as you can use just Perl if you like. I don't think you can get any closer to embedding Perl than this.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Re^2: Perl mindshare in web development
by Anonymous Monk on Jun 04, 2006 at 09:32 UTC
    The single best thing that could be done to popularize Perl to the masses would be to make Perl code embeddable in pages...This sort of format is really the only thing that makes PHP popular. If Perl could do that, I'd never touch PHP
    I can't understand why embedding code in webpages is so widely considered a special ability of PHP which Perl lacks when that is such a basic built-in feature of mod_perl.

    Why hasn't anyone mentioned Perl Server-Side Includes which Apache 1.3 provides out of the box with mod_include?

    <!--#perl sub="print q~one line of perl code~" -->
    It's so easy, so powerful, so... obvious!
    <!--#perl sub="sub{ $_ = 'Multiple lines of Perl code.'; s/\.$/.../; print }"-->
    Apache 2.0 moves this capability to the Apache::IncludeHook module.
    If Perl could do that
    Famous last words. What made you think it could not?
      I can't understand why embedding code in webpages is so widely considered a special ability of PHP which Perl lacks when that is such a basic built-in feature of mod_perl.

      Because "mod_perl compiled with the SSI option" ne "perl".

      Because the "out the box" experience with PHP for the web for most people is a Apache already enabled with mod_php. For Perl it's the good old fashioned cgi-bin directory.

      Yes, Perl can do all that PHP can do. Yes, in many cases it can do it better from a certain technical perspective. But for most people getting up and running with PHP is way easier than getting up and running with mod_perl.

      A reply falls below the community's threshold of quality. You may see it by logging in.