
MojoX::Routes - Routes

use MojoX::Routes;
my $routes = MojoX::Routes->new;

MojoX::Routes is a routes implementation.
block my $block = $routes->block;
$routes = $routes->block(1);
children my $children = $routes->children;
$routes = $routes->children([MojoX::Routes->new]);
inline my $inline = $routes->inline;
$routes = $routes->inline(1);
name my $name = $routes->name;
$routes = $routes->name('foo');
parent my $parent = $routes->parent;
$routes = $routes->parent(MojoX::Routes->new);
pattern my $pattern = $routes->pattern;
$routes = $routes->pattern(MojoX::Routes::Pattern->new);
segmentsmy $segments = $routes->segments;

MojoX::Routes inherits all methods from Mojo::Base and implements the follwing the ones.
new my $routes = MojoX::Routes->new;
my $routes = MojoX::Routes->new('/:controller/:action');
bridge my $bridge = $routes->bridge;
my $bridge = $routes->bridge('/:controller/:action');
to my $to = $routes->to;
$routes = $routes->to(action => 'foo');
$routes = $routes->to({action => 'foo'});
is_endpointmy $is_endpoint = $routes->is_endpoint;
matchmy $match = $routes->match($tx);
parse $routes = $routes->parse('/:controller/:action');
route my $route = $routes->route('/:c/:a', a => qr/\w+/);
to_stringmy $string = $routes->to_string;
url_for my $url = $routes->url_for($url);
my $url = $routes->url_for($url, {foo => 'bar'});
waypoint my $route = $routes->waypoint('/:c/:a', a => qr/\w+/);