in reply to Perl mindshare in web development

Ok, that looks a lot closer to the PHP syntax. I do wonder about the following, though:

"Blocks of the form <% xxx %> are replaced with the result of evaluating xxx as a single Perl expression."

Is the page file run like a regular Perl script, only with things outside the Perl tags returned as-is? Or is there an extra layer between the Perl interpreter and the page that does messy things like eval to convert the page to output? In other words, is Mason actually integrated into the basic Perl, or is it sitting on top? How does the efficiency compare to PHP?

Replies are listed 'Best First'.
Re^2: Perl mindshare in web development
by perrin (Chancellor) on May 21, 2006 at 19:49 UTC
    Mason is not more "integrated" into Perl than other modules are, but I don't think it's relevant. Mason turns your page into a Perl subroutine. It's all done internally, and you typically don't need to think about how it works. PHP has to do something similar, i.e. compile the page into code before running it. PHP is a little faster than Mason, but other Perl projects like Embperl and Apache::ASP are about the same speed. You can read about other in-line Perl templating tools in my essay.