Path::Dispatcher::Rule::Empty - matches only the empty path


Path-Dispatcher documentation Contained in the Path-Dispatcher distribution.

Index


Code Index:

NAME

Top

Path::Dispatcher::Rule::Empty - matches only the empty path

DESCRIPTION

Top

Rules of this class match only the empty path.


Path-Dispatcher documentation Contained in the Path-Dispatcher distribution.

package Path::Dispatcher::Rule::Empty;
use Any::Moose;
extends 'Path::Dispatcher::Rule';

sub _match {
    my $self = shift;
    my $path = shift;
    return if length $path->path;
    return { leftover => $path->path };
}

__PACKAGE__->meta->make_immutable;
no Any::Moose;

1;

__END__