Data::NestedParams - entry[title]=foo&tags[]=art&tags[]=modern
use Data::NestedParams; my $expanded = expand_nested_params( [ 'entry[title]' => 'foo', 'tags[]' => 'art', 'tags[]' => 'modern', ] ); # $expanded = { entry => {title => 'foo'}, tags => ['art', 'modern'] };
Ruby on Rails has a nice feature to create nested parameters that help with the organization of data in a form - parameters can be an arbitrarily deep nested structure.
The way this structure is denoted is that when you construct a form the field names have a special syntax which is parsed.
Copyright (C) Tokuhiro Matsuno.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Tokuhiro Matsuno <tokuhirom@gmail.com>
Catalyst::Plugin::Params::Nested, CGI::Expand https://github.com/rack/rack/blob/master/lib/rack/utils.rb#L90
To install Data::NestedParams, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::NestedParams
CPAN shell
perl -MCPAN -e shell install Data::NestedParams
For more information on module installation, please visit the detailed CPAN module installation guide.