The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

HTTP::Router::Route - Route Representation for HTTP::Router

SYNOPSIS

  use HTTP::Router;
  use HTTP::Router::Route;

  my $router = HTTP::Router->new;

  my $route = HTTP::Router::Route->new(
      path       => '/',
      conditions => { method => 'GET' },
      params     => { controller => 'Root', action => 'index' },
  );

  $router->add_route($route);

METHODS

match($req)

Returns a HTTP::Router::Match object, or undef if route does not match a given request.

append_path($path)

Appends path to route.

add_params($params)

Adds parameters to route.

add_conditions($conditions)

Adds conditions to route.

extract($path)

Extracts variable values from $path, and returns variable hash.

uri_for($args?)

Returns a path which is processed with parameters.

PROPERTIES

path

Path string for route.

params

Route specific parameters.

conditions

Conditions for determining route.

templates

URI::Template::Restrict representation with route path.

parts

Size of splitting route path with slash.

variables

Variable names in route path.

AUTHOR

NAKAGAWA Masaki <masaki@cpan.org>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

HTTP::Router