Trying to debug why the Example code doesn't display errors on the login page, I traced into CGI::Application::Framework::login to find:

   $self->log->debug("At top of 'login' subroutine / run mode ");
   # ------------------------------------------------------------------
   # Note that the '_errs' param will be populated if there was
   # an error with the processing of a login form submission; this is a
   # CGI::Application::Plugin::ValidateRM ->check_rm method thing,
   # called from within the 'cgiapp_prerun' subroutine.  There are
   # tmpl_var fields within the .tmpl loaded below that correspond to
   # the entries named in $err.  After reading it, unset it so that
   # it isn't polluted with information the next time this sub is
   # accessed.
   # ------------------------------------------------------------------
   my $errs = shift || $self->_param_read_and_unset('_errs');
   $self->log->debug("\$errs is: " . Data::Dumper->Dump([$errs],[qw(*errs)]));


and indeed, $errs is set correctly, but there's no use of this variable in the rest of the login subroutine. I.e., %tmplvars never gets set with anything.
It would appear it needs something after:

   foreach my $hash ( $self->_login_tmpl_params() ) {
       while ( my ($key, $value) = each %$hash ) {
           $tmplvars{$key} = $value;
       }
   }

like:
while ( my($key,$value = each %$errs ) {
   $tmplvars{$key} = $value;
}

My file version says 0.26.

Eric.
_______________________________________________
caf mailing list
caf@lpi.org
http://list.lpi.org/cgi-bin/mailman/listinfo/caf

Reply via email to