Re: Delayed output generation feature?

Dave Rolsky <[email protected]>
Newsgroups gmane.comp.web.mason.devel
Message-ID <[email protected]>
On Sun, 20 Feb 2005, Jonathan Swartz wrote:

> On masonhq.com we solve this by allowing special tags to be inserted
> anywhere in content:
>
>   <mhq:title>My title</mhq:title>
>
> <mhq:body>onLoad="self.focus();document.choose.wiki_name.focus()"</mhq:body>
>
> then parse these out in the autohandler. Yes, HTML scanning is a little
> hacky, but it feels a LOT friendlier to me than putting
>
>    <%perl>
>    $m->notes('title' => 'My title');
>    $m->notes('body' => 'onLoad...');
>    </%perl>
>
> on pages. In other words I'd rather do a little scanning in the autohandler
> and provide a nice "API" for pages, than require each page to write Perl
> code.
>
> Does this tag solution appeal to anyone besides me? :) Would it be worth
> making more generic, perhaps (as Doug suggested) in a plugin?

A plugin'd be cool, I think.  I've been looking at doing something vaguely 
similar with a MasonX::WebApp subclass, but haven't had time to explore it 
much yet.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.