URI::Dispatch is a Perl module to determine which code to execute based upon path.
SYNOPSIS
my $dispatch = URI::Dispatch->new();
$dispatch->add( '/', 'Homepage' );
# common matching patterns are available
$dispatch->add( '/user/#id', 'Profile' );
# optional parts of the path
$dispatch->add( '/article/#id[/#slug]', 'Article' );
# named captures
$dispatch->add( '/tag/#name:slug', 'Tag' );
# use a custom regexp
$dispatch->add( '/a-z/#letter:([a-z])', 'AZ::Page' );
# pass in a path and determine what matches
my( $handler, $options)
= $dispatch->handler( '/article/5/awesome-article' );
# handler='Article', options=['5','awesome-article']
# automatically calls Tag::get (as that matches the path)
my $response = $dispatch->dispatch( '/tag/perl' );
# construct paths
my $uri = $dispatch->url( 'article', [ '1', 'some-article' ] );
# uri='/article/1/some-article'
Product's homepage
Requirements:
· Perl