Hello, are there any ready modules for Dancer that can parse post data from forms with hashes in names like CGI::WebIn? I really need to be able to do <input type=text name="Address{Russia}{Moscow}" value="house"> or <input name='zone{}' type='checkbox' value='com'> and to get something like parameters('body')->{Address}->{Russia}->{Moscow}. -- Best Regards, Nick Knutov http://knutov.com ICQ: 272873706 Voice: +7-904-84-23-130
Nothing I know, but shouldn't be too hard to rock up a plugin to do that.
From a brief think, it almost sounds like you're taking the wrong approach, though.
"Nick Knutov" <mail@knutov.com> wrote:
Hello,
are there any ready modules for Dancer that can parse post data from forms with hashes in names like CGI::WebIn?
I really need to be able to do <input type=text name="Address{Russia}{Moscow}" value="house"> or <input name='zone{}' type='checkbox' value='com'> and to get something like parameters('body')->{Address}->{Russia}->{Moscow}.
-- Best Regards, Nick Knutov http://knutov.com ICQ: 272873706 Voice: +7-904-84-23-130 _______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
-- David Precious <davidp@preshweb.co.uk> Sent from my phone so please excuse brevity / poor quoting style etc
Just out of curiosity: 1. what do you expect to see from <input name='zone{}' type='checkbox' value='com'>? 2. why parameters('body')->{Address}... instead of parameters('Address')->...? Cheers, Flavio. On Mon, Mar 14, 2011 at 6:56 PM, Nick Knutov <mail@knutov.com> wrote:
Hello,
are there any ready modules for Dancer that can parse post data from forms with hashes in names like CGI::WebIn?
I really need to be able to do <input type=text name="Address{Russia}{Moscow}" value="house"> or <input name='zone{}' type='checkbox' value='com'> and to get something like parameters('body')->{Address}->{Russia}->{Moscow}.
-- Best Regards, Nick Knutov http://knutov.com ICQ: 272873706 Voice: <%2B7-904-84-23-130>+7-904-84-23-130 _______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
1. Something like defined $IN{zone}->{com} and keys %{$IN{zone}}, according to my very old code. http://4dns.ru is working sample. 2. does not matter, both way will be ok. Anyway, I have a lot of script written during the last ten years which are using this feature, usually in big forms (those two samples and structures like $IN{table}->{number}->{field} and now I want to rewrite all of them to dancer. I see no other suitable way to do this. On 14.03.2011 23:01, Flavio Poletti wrote:
Just out of curiosity:
1. what do you expect to see from <input name='zone{}' type='checkbox' value='com'>?
2. why parameters('body')->{Address}... instead of parameters('Address')->...?
Cheers,
Flavio.
On Mon, Mar 14, 2011 at 6:56 PM, Nick Knutov <mail@knutov.com <mailto:mail@knutov.com>> wrote:
Hello,
are there any ready modules for Dancer that can parse post data from forms with hashes in names like CGI::WebIn?
I really need to be able to do <input type=text name="Address{Russia}{Moscow}" value="house"> or <input name='zone{}' type='checkbox' value='com'> and to get something like parameters('body')->{Address}->{Russia}->{Moscow}.
-- Best Regards, Nick Knutov http://knutov.com ICQ: 272873706 Voice: <tel:%2B7-904-84-23-130>+7-904-84-23-130 <tel:%2B7-904-84-23-130> _______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org <mailto:Dancer-users@perldancer.org> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
-- Best Regards, Nick Knutov http://knutov.com ICQ: 272873706 Voice: +7-904-84-23-130
participants (3)
-
David Precious -
Flavio Poletti -
Nick Knutov