[Catalyst-commits] r7050 - trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication

bricas at dev.catalyst.perl.org bricas at dev.catalyst.perl.org
Wed Oct 24 21:22:15 GMT 2007


Author: bricas
Date: 2007-10-24 21:22:14 +0100 (Wed, 24 Oct 2007)
New Revision: 7050

Modified:
   trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Realm.pm
Log:
use Null store by default

Modified: trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Realm.pm
===================================================================
--- trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Realm.pm	2007-10-24 19:45:53 UTC (rev 7049)
+++ trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Realm.pm	2007-10-24 20:22:14 UTC (rev 7050)
@@ -18,13 +18,12 @@
     $self->name($realmname);
     
     $app->log->debug("Setting up auth realm $realmname") if $app->debug;
-    if (!exists($config->{'store'}{'class'})) {
-        Carp::croak "Couldn't setup the authentication realm named '$realmname', no class defined";
+
+    # use the Null store as a default
+    if( ! exists $config->{store}{class} ) {
+        $config->{store}{class} = '+Catalyst::Plugin::Authentication::Store::Null';
+        $app->log->debug( qq(No Store specified for realm "$realmname", using the Null store.) );
     } 
-        
-    $config->{store}{class} ||= '+Catalyst::Plugin::Authentication::Store::Null';
-    
-    # use the 
     my $storeclass = $config->{'store'}{'class'};
     
     ## follow catalyst class naming - a + prefix means a fully qualified class, otherwise it's
@@ -34,7 +33,6 @@
     } else {
         $storeclass = $1;
     }
-    
 
     # a little niceness - since most systems seem to use the password credential class, 
     # if no credential class is specified we use password.




More information about the Catalyst-commits mailing list