Add obj() as shorthand method for get_object()
[catagits/Catalyst-Plugin-Authentication.git] / lib / Catalyst / Authentication / Realm.pm
index 5c31034..550da39 100644 (file)
@@ -29,8 +29,9 @@ sub new {
 
     $app->log->debug("Setting up auth realm $realmname") if $app->debug;
 
-    # use the Null store as a default
-    if( ! exists $config->{store}{class} ) {
+    # 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}) ) {
         $config->{store}{class} = '+Catalyst::Authentication::Store::Null';
         $app->log->debug( qq(No Store specified for realm "$realmname", using the Null store.) );
     }