Re: Filters Extension
Daniel Zulla <[email protected]> Mon, 14 Jun 2010 11:39:25 +0200
| Newsgroups | gmane.comp.web.mason.devel |
|---|---|
| Message-ID | <[email protected]> |
At the moment, it would have to be directly added to the core.
Mason should solve "common problems of site development" - so why not
security too.
And adding security by an extension, isn't a good idea.
for the core, my impression looks like:
<%args>
<%need:Int[1-100]:$foo>No Int</%need>
<%need:Str:$bar>No Str</%need>
<%opt:Int:$error></%opt>
<%e:custom>
</%args>
<html>
<%ifdef:$error><%=>Error Occured $table{$error}</%=>
[loginform ...]
<%exception:custom>
errors: $__E[0], $__E[1] # no int, no str
</%exception>
or something like that.
if you like it; would be glad to implement it.
h() could be written in XS too btw. If there's a mason application in
really productional use, this method is called so damn often, that C would
improve performance. :)
A <%minify> tag for <%minify:css> (Minify::CSS::XS) and <%minify:js>
(Minify::JavaScript::XS) is worth a thougt about it too.
--
scio
> That looks nice Daniel!
>
> Is this written in a way that it can be used as an extension, or would
> it have to be added to the core?
>
> Jon
>
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo