Senph::PSGI::Router
package Senph::PSGI::Router; use 5.026; # ABSTRACT: define routes use Router::Simple; sub routes { my $self = shift; my $router = Router::Simple->new(); $router->connect( '/api/comment/:topic', { controller => 'comment_ctrl', action => 'topic', rest => 1 } ); $router->connect( '/api/comment/:topic/:reply_to', { controller => 'comment_ctrl', action => 'reply', rest => 1 } ); return $router; }