HTTP::Router::Match - Matched Object Representation for HTTP::Router


HTTP-Router documentation Contained in the HTTP-Router distribution.

Index


Code Index:

NAME

Top

HTTP::Router::Match - Matched Object Representation for HTTP::Router

METHODS

Top

uri_for($args?)

Returns a route path which is processed with parameters.

PROPERTIES

Top

params

Route parameters which was matched.

captures

Captured variable parameters which was matched.

route

HTTP::Router::Route object which was matched.

AUTHOR

Top

NAKAGAWA Masaki <masaki@cpan.org>

LICENSE

Top

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

SEE ALSO

Top

HTTP::Router, HTTP::Router::Route


HTTP-Router documentation Contained in the HTTP-Router distribution.

package HTTP::Router::Match;

use strict;
use warnings;
use base 'Class::Accessor::Fast';

__PACKAGE__->mk_accessors(qw'params captures route');

sub new {
    my ($class, %args) = @_;
    return bless {
        params   => {},
        captures => {},
        %args,
    }, $class;
}

sub uri_for {
    my ($self, @args) = @_;
    $self->route->uri_for(@args);
}

1;