[Catalyst] [Patch] Catalyst::Plugin::Authentication::Credential::Password.pm -- typo and debug consistency

Frank Wiegand frank.wiegand at gmail.com
Mon Jan 9 15:47:16 CET 2006


This patch fixes a little typo and adds " if $c->debug" to all
$c->log->debug("...") calls.


Frank
-------------- next part --------------
Index: Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Credential/Password.pm
===================================================================
--- Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Credential/Password.pm	(Revision 2960)
+++ Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Credential/Password.pm	(Arbeitskopie)
@@ -18,7 +18,8 @@
             || $_->param("username") )
         {
             $c->log->debug(
-                "Can't login a user without a user object or user ID param");
+                "Can't login a user without a user object or user ID param")
+                  if $c->debug;
             return;
         }
 
@@ -26,13 +27,14 @@
             || $_->param("passwd")
             || $_->param("pass") )
         {
-            $c->log->debug("Can't login a user without a password");
+            $c->log->debug("Can't login a user without a password")
+              if $c->debug;
             return;
         }
     }
 
     unless ( Scalar::Util::blessed($user)
-        and $user->isa("Catalyst:::Plugin::Authentication::User") )
+        and $user->isa("Catalyst::Plugin::Authentication::User") )
     {
         if ( my $user_obj = $c->get_user($user) ) {
             $user = $user_obj;
@@ -52,8 +54,7 @@
     }
     else {
         $c->log->debug(
-            "Failed to authenticate user '$user'. Reason: 'Incorrect password'"
-          )
+            "Failed to authenticate user '$user'. Reason: 'Incorrect password'")
           if $c->debug;
         return;
     }


More information about the Catalyst mailing list