http://qs1969.pair.com?node_id=1206864

hesco has asked for the wisdom of the Perl Monks concerning the following question:

https://gist.github.com/hesco/84f60c9c7eb5e4e6725262cd854dda1e

I am seeing this log entry: "[debug] Controller "Vote::Controller::User::Login::User::Login" does not exist". However, it would find everything it needs, instead at this path: Vote::Controller::User::Login.

[Sun Jan 7 17:42:43 2018] [debug] GET "/cgi-bin/index" [Sun Jan 7 17:42:43 2018] [debug] Routing to a callback [Sun Jan 7 17:42:43 2018] [debug] [CGI:index:23229] START /opt/local/ +vote/vagrant/cf_vote/scripts/index [Sun Jan 7 17:42:45 2018] [debug] 200 OK (1.266254s, 0.790/s)

That worked fine.

[Sun Jan 7 17:42:50 2018] [debug] GET "/cgi-bin/login" [Sun Jan 7 17:42:50 2018] [debug] Routing to application "Vote::Contr +oller::User::Login" [Sun Jan 7 17:42:50 2018] [debug] Controller "Vote::Controller::User: +:Login::User::Login" does not exist

Expecting to seek, instead:
Vote::Controller::User::Login

[Sun Jan 7 17:42:50 2018] [debug] Rendering template "user/login/logi +n_dispatch.html.ep" [Sun Jan 7 17:42:50 2018] [debug] Rendering template "auth/login_page +.html.ep" [Sun Jan 7 17:42:50 2018] [debug] Rendering template "auth/login.html +.ep" [Sun Jan 7 17:42:50 2018] [debug] Rendering template "auth/password_r +eminder.html.ep" [Sun Jan 7 17:42:50 2018] [debug] Rendering template "auth/password_r +eset.html.ep" [Sun Jan 7 17:42:50 2018] [debug] Rendering template "auth/get_a_logi +n.html.ep" [Sun Jan 7 17:42:50 2018] [debug] Rendering template "layouts/default +.html.ep" [Sun Jan 7 17:42:50 2018] [debug] Rendering template "layouts/header. +html.ep" [Sun Jan 7 17:42:50 2018] [debug] Rendering template "auth/logout.htm +l.ep" [Sun Jan 7 17:42:50 2018] [debug] Rendering template "layouts/footer. +html.ep" [Sun Jan 7 17:42:50 2018] [debug] 200 OK (0.084435s, 11.843/s)

It found the intended templates, but unsupported by a useful controller, I am getting white screen of death in the browser.

package Vote; use lib qw( lib local/lib/perl5 ); use Mojo::Base 'Mojolicious'; use CGI; use Moose; use MooseX::NonMoose; # <snip other dependencies, several Moose-enabled attributes> sub startup { my $self = shift; my $log_file = 'VoteApp.log'; # <snip> $self->plugin('CGI', { support_semicolon_in_query_string => 1, route => '/cgi-bin/index', script => '/opt/local/vote/vagrant/cf_vote/scripts/index', errlog => $log_file, }); # and several additional routes to legacy 2006 era cgi scripts $r->any(['GET','POST'] => '/cgi-bin/login')->to( controller => 'user-login', action => 'login_dispatch', ); $r->any(['GET','POST'] => '/cgi-bin/password-reminder')->to( controller => 'user-login', action => 'login_dispatch', ); $self->plugin('CGI', { support_semicolon_in_query_string => 1, route => '/cgi-bin/admin', script => '/opt/local/vote/vagrant/cf_vote/scripts/admin', errlog => $log_file, }); # <snip> }

My question being: what is it I am missing about routing, which is causing this bug?

2018-01-09 Athanasius added code tags to log entry and linkified link

if( $lal && $lol ) { $life++; }
if( $insurance->rationing() ) { $people->die(); }