NAME
Mojo::Parameters - Parameter Container
SYNOPSIS
use Mojo::Parameters;
my $params = Mojo::Parameters->new(foo => 'bar', baz => 23);
print "$params";
DESCRIPTION
Mojo::Parameters is a container for form parameters.
ATTRIBUTES
Mojo::Parameters implements the following attributes.
charset
my $charset = $params->charset;
$params = $params->charset('UTF-8');
pair_separator
my $separator = $params->pair_separator;
$params = $params->pair_separator(';');
params
my $parameters = $params->params;
$params = $params->params(foo => 'b;ar', baz => 23);
METHODS
Mojo::Parameters inherits all methods from Mojo::Base and implements the following new ones.
new
my $params = Mojo::Parameters->new;
my $params = Mojo::Parameters->new('foo=b%3Bar&baz=23');
my $params = Mojo::Parameters->new(foo => 'b;ar', baz => 23);
append
$params = $params->append(foo => 'ba;r');
clone
my $params2 = $params->clone;
merge
$params = $params->merge($params2, $params3);
param
my $foo = $params->param('foo');
my @foo = $params->param('foo');
my $foo = $params->param(foo => 'ba;r');
parse
$params = $params->parse('foo=b%3Bar&baz=23');
remove
$params = $params->remove('foo');
to_hash
my $hash = $params->to_hash;
to_string
my $string = $params->to_string;