sub _private_routes { my $app = shift; my $r = $app->routes->under('/')->to('user#auth'); $r->get('/')->to(template => 'user/dashboard')->name('dashboard'); $r; } sub _public_routes { my $app = shift; my $r = $app->routes; $r->get('/')->to(template => 'index')->name('index'); $r; }