http://qs321.pair.com?node_id=29007


in reply to What is the best tool to embed perl in HTML?

I'm a big fan of HTML::Mason (I wrote a lynx-component in under an hour to make our site lynx/diability-accessible), but as with everything YMMV depending on what you're trying to accomplish.

For instance: I love Mason's component architecture because I have a 400+ page site to maintain and I want to be able to make a change in one place (component) and have that propagate across the site instantly, and by using components and autoloaders this (and many other fun little games) becomes not only possible but, frankly, easy.

I have to admit ignorance of the other tools, but a quick glance at some of the code above suggests (merely suggests, I've just admitted ignorance) that Embperl is doing a lot more magic on the backend that Mason or Apache::ASP. I can envision some situations where this would be a plus (rapid prototyping and deployment), and some where this would be a minus (when I want Perl to behave in a very particular way).

Only a close reading of the documentation for each will really tell you where the tradeoffs lie -- I think that Mason has some big advantages in small to mid-sized sites with a small number of staffmembers allocated to maintenance... why? Because autohandlers/components make it easy to seperate code from content and allow people to work on different pieces simultaneously through it's primitive object interface (added is 0.81 I believe), and the caching scheme seems to scale well up to 100,000 hits/month or more (but not into the millions).

I'd suspect that Embperl, because of the backend magic, might have slightly higher overhead which could become an issue at the higher end of hits/month. But maybe I'm dead wrong... anyone care to show me?