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

captures

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

endpoint

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

path

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

stack

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

tx

transaction

my $tx = $match->tx;
my $tx = $match->transaction;
$match = $match->tx(Mojo::Transaction->new);
$match = $match->transaction(Mojo::Transaction->new);

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(Mojo::Transaction->new);

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'});