Test::HTTP::Router - Route Testing
use Test::More; use Test::HTTP::Router; use HTTP::Router; my $router = HTTP::Router->new; $router->add_route('/' => ( conditions => { method => 'GET' }, params => { controller => 'Root', action => 'index' }, )); match_ok $router, '/', { method => 'GET' }; params_ok $router, '/', { method => 'GET' }, { controller => 'Root', action => 'index' };
To install HTTP::Router, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTTP::Router
CPAN shell
perl -MCPAN -e shell install HTTP::Router
For more information on module installation, please visit the detailed CPAN module installation guide.