-
-
06 May 2012 15:23:22 UTC
- Distribution: Mojolicious-Plugin-GroupedParams
- Module version: 0.04
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (0)
- Testers (176 / 750 / 0)
- Kwalitee
Bus factor: 0- 86.05% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (4.19KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- unknown
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Mojolicious::Plugin::GroupedParams - grouped params from query.
VERSION
Version 0.04
SYNOPSIS
use Mojolicious::Lite; plugin 'grouped_params'; post '/save_article' => sub { my ( $self ) = @_; my $new_article = $self->grouped_params('article'); $self->db->resultset('Article')->create($new_article); }; # In template <input name="article.name" value="<%= grouped_params('article')->{name} %>" /> <textarea name="article.text"><%= grouped_params('article')->{text} %></textarea>
CONFIG
delimiters
Set delimiters to split parameters names. Default is [ "." ]
$self->plugin( 'grouped_params', {delimiter => [ "-", "."] } )
FUNCTIONS
register
Register plugin
grouped_params
This helper groups params with name like <group>.<name> and put grouped params into stash variable "grouped_params".
AUTHOR
Ivan Sokolov,
<ivsokolov at cpan.org>
BUGS
Please report any bugs or feature requests to
bug-mojolicious-plugin-groupedparams at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Mojolicious-Plugin-GroupedParams. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.LICENSE AND COPYRIGHT
Copyright 2010 Ivan Sokolov.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
Module Install Instructions
To install Mojolicious::Plugin::GroupedParams, copy and paste the appropriate command in to your terminal.
cpanm Mojolicious::Plugin::GroupedParams
perl -MCPAN -e shell install Mojolicious::Plugin::GroupedParams
For more information on module installation, please visit the detailed CPAN module installation guide.