A better fix for the realm class name warning problem.
Jay Kuri [Sat, 28 Mar 2009 01:52:44 +0000 (01:52 +0000)]
lib/Catalyst/Authentication/Realm.pm

index 550da39..db9b4c2 100644 (file)
@@ -31,9 +31,11 @@ sub new {
 
     # use the Null store as a default - Don't complain if the realm class is being overridden, 
     # as the new realm may behave differently.
-    if( ! exists($config->{store}{class}) && ! exists($config->{class}) ) {
+    if( ! exists($config->{store}{class}) ) {
         $config->{store}{class} = '+Catalyst::Authentication::Store::Null';
-        $app->log->debug( qq(No Store specified for realm "$realmname", using the Null store.) );
+        if (! exists($config->{class})) {
+            $app->log->debug( qq(No Store specified for realm "$realmname", using the Null store.) );
+        }
     } 
     my $storeclass = $config->{'store'}{'class'};