return from eval doesn't return function
[chaz/chatty] / lib / Chatty / Controller / Root.pm
index f526d4152aa3e4e2a76e19d866604573fc96b737..3b7fa3ddbaeca90f5f118ff509bef2966fe612be 100644 (file)
@@ -75,9 +75,11 @@ sub login :Local :Args(0) {
                        $c->res->redirect($c->uri_for_action('index'));
                        return;
                }
+               else {
+                       $c->flash->{error} = "Log-in failed! Try again, I guess.";
+                       $c->res->redirect($c->uri_for_action('login'));
+               }
        };
-       $c->flash->{error} = "Log-in failed! Try again, I guess.";
-       $c->res->redirect($c->uri_for_action('login'));
 }
 
 =head2 logout
This page took 0.016484 seconds and 4 git commands to generate.