Router::Simple::Reversible - Router::Simple equipped with reverse routing
use Router::Simple::Reversible; my $router = Router::Simple::Reversible->new; # Same as Router::Simple $router->connect('/blog/{year}/{month}', {controller => 'Blog', action => 'monthly'}); $router->path_for({ controller => 'Blog', action => 'monthly' }, { year => 2015, month => 10 }); # => '/blog/2015/10'
Router::Simple::Reversible inherits Router::Simple and provides path_for method which produces a string from routing destination and path parameters given.
path_for
Copyright (C) motemen.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
motemen <motemen@gmail.com>
To install Router::Simple::Reversible, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Router::Simple::Reversible
CPAN shell
perl -MCPAN -e shell install Router::Simple::Reversible
For more information on module installation, please visit the detailed CPAN module installation guide.