NAME

Gears::Router::Location::Match - Most basic location implementation

SYNOPSIS

use Gears::Router::Location::Match;

my $location = Gears::Router::Location::Match->new(
	pattern => '/exact/path',
	router => $router,
);

# This will match
my $match = $location->compare('/exact/path');

# This will not match
my $no_match = $location->compare('/exact/path/extra');

DESCRIPTION

Gears::Router::Location::Match is a location implementation that performs exact string matching. If the location is a bridge, it matches when the request path starts with the pattern. If it's not a bridge, it only matches when the path equals the pattern exactly.

This is the simplest location type that doesn't support any placeholders or wildcards. While it may not be useful for any real work, it can be used to reduce the number of moving parts when testing other parts of the router.

INTERFACE

Inherits interface from Gears::Router::Location. Uses Gears::Router::Pattern::Match for pattern matching.