[Dancer-users] Dancer::Forms
T. Linden
tom at linden.at
Wed Jan 11 15:03:50 CET 2012
Hello Everyone,
first of all I'd like to thank the developers of Dancer so much. It's a
great thing and I love it more from day to day!
While I'm new to Dancer, I'm not new to perl, but were using Django as
app server for a long time now. Some day I thaught: this has to be done
in perl, dammit - and I discovered Dancer.
However, I missed one thing, that is the forms module of Django. With
forms you can validate user input, and generate forms. Since I didn't
find anything near such a thing, I implemented it myself: Dancer::Forms.
It does the very same as the Django forms system does: you define some
fields, how they shall be validated, feed your template with it, and
that's it.
Beside user input validation I also added a CSRF protection feature to
the module. This one could be better put into a Dancer plugin perhaps,
I'm unsure...
The name maybe misleading, since Dancer::Forms does in fact not depend
on Dancer. So it could be used in other environments as well. I hope it
is ok, to put it into the Dancer:: namespace anyway.
There's still lots of things to do, like more unit tests, better
debugging possibilities and - maybe - some kind of "model forms" sub
module, which generates the forms from a dbic definition...
Take a look: https://metacpan.org/module/Dancer::Forms
best regards,
Tom
--
Please note that according to the German law on data retention,
information on every electronic information exchange with me is
retained for a period of six months.
More information about the Dancer-users
mailing list