Filters Extension

Daniel Zulla <[email protected]> Mon, 31 May 2010 14:30:04 +0200
Newsgroups gmane.comp.web.mason.devel
Message-ID <[email protected]>
Hi,

i want sugget an input filter, based on MooseX::Types, cause i just think
if the variables given to your application
don't match your needs, you shouldn't continue the execution. that improves
security and performance. example given:
if you expect an integer<5-100> as $foo, but you get a string, you don't
have to go on, and execute the sql statement, 
cause you already know, it will fail.

i wrote am example extension for the lexer [1] and the compiler [2], and a
in-use example [3].

if the parameters don't match, or if the request method is wrong, a default
error template, showing the specified error messages,
should be delivered - unless no <%callback> is set.

line 60-61 in compiler.txt is calling is_Int from Moose, checking if the
paremeter is an integer.

what do you guys think about it?

greets,
scio

[1] Lexer Code: http://scix.de/lexical.txt
[2] Compiler Code: http://scix.de/compiler.txt
[3] In-Use Example: http://scix.de/in_use.txt

------------------------------------------------------------------------------