Why not adopt me?
NAME
Data::InputMonster::Util::Catalyst - InputMonster sources for common Catalyst sources
VERSION
version 0.001
DESCRIPTION
This module exports a bunch of routines to make it easy to use Data::InputMonster with Catalyst. Each method, below, is also available as an exported subroutine, through the magic of Sub::Exporter.
These sources will expect to receive the Catalyst object ($c
) as the $input
argument to the monster's consume
method.
METHODS
form_param
my $source = form_param($field_name);
This source will look for form parameters (with $c->req->params
) with the given field name.
body_param
my $source = body_param($field_name);
This source will look for form parameters (with $c->req->body_params
) with the given field name.
query_param
my $source = query_param($field_name);
This source will look for form parameters (with $c->req->query_params
) with the given field name.
session_entry
my $source = session_entry($locator);
This source will look for an entry in the session for the given locator. If the locator is a string, it is used as a hash key for the session. If it is a code ref, the code is called and passed the session as its first parameter.
AUTHOR
Ricardo SIGNES <rjbs@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2008 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under the same terms as perl itself.