XP is just a number | |
PerlMonks |
Mason2: Where is support for <%attr> gone? <%class> not an alternative for my needby flowdy (Scribe) |
on Jul 14, 2014 at 13:30 UTC ( [id://1093551]=perlquestion: print w/replies, xml ) | Need Help?? |
flowdy has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks,
I am planning the migration from HTML::Mason (version 1) to Mason version 2. It is a website of approx. 1000 pages most of which contain static html only. Mason 1 is very good at wrapping the contents of the files in a frame providing navigation and the usual stuff. Some pages have got additional intelligence that is realized with plain perl. All pages have got a page title set:
You might ask why it's not simply static <h1>-Tags. But I realized the page title as an attribute due to the fact that this information, among other, is needed for our institutional web management system. Now, the equivalent Mason 2 code would be:
'ro' means read-only, init_arg => undef makes sure the title cannot be reset to some 'title' param passed by URL query part. However, I see two problems with this approach:
Is there something I missed in the documentation? Already considered subclassing Mason::Compilation, overwriting its unnamed_block_types to have it cover <%attr>, but then I have not the slightest clue of how to associate any handling code with it, and the code jungle in that module is very impressive, leaves me reluctant to duplicate and change any piece of it. Unfortunately, CMS are not considered an option for us. Only Mason provides for enough flexibility regarding our needs. Oh dear monks, I hope you can help me here. Regards,
Back to
Seekers of Perl Wisdom
|
|