Fixing Progressive to have it's own new(), since it doesn't use a
Jay Kuri [Sat, 28 Mar 2009 01:57:36 +0000 (01:57 +0000)]
store or credential directly but instead defers to other realms

lib/Catalyst/Authentication/Realm/Progressive.pm

index 4390f45..c4bcf44 100644 (file)
@@ -139,6 +139,21 @@ sub authenticate {
     return;
 }
 
+## we can not rely on inheriting new() because in this case we do not 
+## load a credential or store, which is what new() sets up in the 
+## standard realm.  So we have to create our realm object, set our name
+## and return $self in order to avoid nasty warnings.
+
+sub new {
+    my ($class, $realmname, $config, $app) = @_;
+
+    my $self = { config => $config };
+    bless $self, $class;
+    
+    $self->name($realmname);
+    return $self;
+}
+
 =head1 AUTHORS
 
 J. Shirley C<< <jshirley@cpan.org> >>