Hi,

Your sample works !

One big problem is that when I put "use Mojolicious::Lite;" in the 
controller we speek about, the soft don't work more : I have this error 
message at login :

Page not found... yet! 

None of these routes could generate a response for your GET request for 
/protected, maybe you need to add a new one


But I have in the main file, which worked before "use Mojolicious::Lite;" :


package MyApp;

use Mojo::Base 'Mojolicious';
use MyApp::Model::Users;

sub startup {
  my $self = shift;

  $self->secrets(['Mon applix! mojo premiere']);
  $self->helper(users => sub { state $users = MyApp::Model::Users->new });

  my $r = $self->routes;
  $r->any('/')->to('login#index')->name('index');
 
  my $logged_in = $r->under('/')->to('login#logged_in');
  $logged_in->get('/protected')->to('engrenage#roues');

  $r->get('/logout')->to('login#logout');
  
}

1;

My version :


amel@debian:~/job/RD/mojo/marc$ mojo version
CORE
  Perl        (v5.20.2, linux)
  Mojolicious (5.54, Tiger Face)

OPTIONAL
  EV 4.0+                 (4.18)
  IO::Socket::IP 0.20+    (0.32)
  IO::Socket::Socks 0.64+ (0.65)
  IO::Socket::SSL 1.84+   (2.002)

You might want to update your Mojolicious to 7.11.


Thanks a lot, best regards,


amka











-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to