Matthew Kennedy wrote >Is there a Perl equivalent to Struts? Mason seems to come close if you >keep yourself disciplined somewhat. > I mentioned a couple of tools in the article that are specifically aimed at MVC: OpenInteract, and Apache::PageKit.
Actually, I think it's pretty easy to replace Struts. Think about what it offers. First, there's a set of taglibs for writing templates without embedding Java code. Template Toolkit blows it away in this area. (I once suggested to one of the authors of Struts that tags like <logic:greaterThan parameter="number" value="7"> are a bit verbose. He told me to buy DreamWeaver.) It doesn't add much beyond advice in the model area. The controller is basically just a dispatch table which can easily be replaced with Apache::Dispatch or even a well-written httpd.conf. To be fair, it does some things to try and make forms easier to deal with. You'd need to get OpenInteract or PageKit to replace that stuff, or write some glue code for the form validators and such on CPAN. Of course you could use Mason, but most Mason users aren't aiming for a strict MVC separation and it's very easy to cheat when your templates are written in in-line perl. - Perrin