On Mar 7, 2012, at 1:59 AM, Jérôme Étévé wrote:

> On 7 March 2012 09:49, Pedro Melo <m...@simplicidade.org> wrote:
>>> #1 is hard to do because Mason is supposed to be content-type agnostic - 
>>> usable for HTML generation but also other kinds of content generation.
> 
> The default filter is defined in the interpreter instance. If you need
> to use Mason to generate any type of content, you can perfectly have
> different interpreters with different default filters. Anything wrong
> with that?
> 

Nothing wrong with that. It's fine to be able to set a default filter in each 
interpreter. I just don't think it can be the default for Mason out of the box.

> If users really insist on having the same Mason interpreter to render
> different types of contents, maybe the default filter should be a
> property of the component? Define it in Base.mc for your HTML
> generating component directory .. job done.


That would be nice. The problem is that the default filter affects compilation 
of the component (in particular, it affects how <% %> tags are converted to 
Perl) so it isn't a simple call you could put in the <%class> section, for 
example - it would have to be a <%flags>, and currently there is no way to 
inherit those.

But I agree, it's appealing to be able to set the default filter on a 
per-component basis, just for the components that output HTML. Would just like 
a better syntax than

   <%flags>
   default_filters => ['H']
   </%flags>

Yuck.

Jon


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to