I can understand why somebody may want to use Perl as a templating language - if you are in this camp you may like HTML::Mason (I used to like it but I switched to TT2 now). But using HTML::Mason as a framework to maintain Perl code for anything other than templating tasks is just nonsence. I just don't undestand why. Code in Mason components is harder to unit test than Perl modules, it takes more effort to structure your code - in ordinary Perl you have packages and subroutines, in Mason you can emulate something like this with components and subcomponents but it takes more effort and finally Mason has quite confusing OOP model which may be ok for templates but is not really up to task for anything complex. How can it be easier to put your Perl code in Mason components instead of Perl modules?
The Possibilities Boggle The Mind (Score:1)
I asked myself the exact same thing reading through the Mason book, but this stuff is used plenty by people way more experienced than I am -- there have to be good reasons, even if I don't understand them quite yet. I don't quite have a complete answer in my mind yet concerning the modules question, but the start of it is something like this: If you've got lots and lots and lots of Perl modules, it might be really ha
------------------------------
You are what you think.
Re:The Possibilities Boggle The Mind (Score:1)
I think HTML::Mason crowd fails a prey of coolness factor. I cannot explain it why but when I discovered HTML::Mason for first time (it must be around 0.6x versio
Ilya Martynov (http://martynov.org/ [martynov.org])
Typos (Score:1)
Ilya Martynov (http://martynov.org/ [martynov.org])
Re:The Possibilities Boggle The Mind (Score:2)
The difference, of course, is that you can break the MVC model when you want to. If you want to all the time, then you'll probably have a mess. But I think 100% MVC is pretty bogus. You jump through ridiculous hoops just to generate the data structures that you pass to your templates, which then iterate through the data structure. You end up c
Re:The Possibilities Boggle The Mind (Score:1)
If you strickly put all other Perl code in Perl modules then yes, it is almost same as with TT2 (though personally I think it provides much better syntax but it is another story).
Ilya Martynov (http://martynov.org/ [martynov.org])
It is about control (Score:1)
Me too... but, somebody had an itch... and this seems to fix it for them.
Who knows, it may help someone else too.
How can it be easier to put your Perl code in Mason components instead of Perl modules?
This is a control issue.
You don't always want to give a web developer the ability to install modules into the "official" web server path... so, putting all of your Perl code into modules becomes non-trivial.
Code