NAME

MojoX::Routes::Match - Match

SYNOPSIS

use MojoX::Routes::Match;

my $match = MojoX::Routes::Match->new;

DESCRIPTION

MojoX::Routes::Match is a match container.

ATTRIBUTES

MojoX::Routes::Match implements the following attributes.

captures

my $captures = $match->captures;
$match       = $match->captures({foo => 'bar'});

endpoint

my $endpoint = $match->endpoint;
$match       = $match->endpoint(1);

method

my $method = $match->method;
$match     = $match->method('get');

path

my $path = $match->path;
$match   = $match->path('/foo/bar/baz');

stack

my $stack = $match->stack;
$match    = $match->stack([{foo => 'bar'}]);

METHODS

MojoX::Routes::Match inherits all methods from Mojo::Base and implements the follwing the ones.

new

my $match = MojoX::Routes::Match->new;
my $match = MojoX::Routes::Match->new('/foo/bar');

is_path_empty

my $result = $match->is_path_empty;

url_for

my $url = $match->url_for;
my $url = $match->url_for(foo => 'bar');
my $url = $match->url_for({foo => 'bar'});
my $url = $match->url_for('named');
my $url = $match->url_for('named', foo => 'bar');
my $url = $match->url_for('named', {foo => 'bar'});