NAME

Mojo::Parameters - Parameters

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

pair_separator

my $separator = $params->pair_separator;
$params       = $params->pair_separator(';');

params

parameters

my $parameters = $params->params;
my $parameters = $params->parameters;
$params        = $params->parameters(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

parameter

my $foo = $params->params('foo');
my $foo = $params->parameter('foo');
my $foo = $params->parameter(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;