[Catalyst-commits] r6556 - in trunk/Catalyst-Plugin-Authentication: . lib/Catalyst/Plugin lib/Catalyst/Plugin/Authentication

matthewt at dev.catalyst.perl.org matthewt at dev.catalyst.perl.org
Tue Jul 17 17:58:57 GMT 2007


Author: matthewt
Date: 2007-07-17 17:58:57 +0100 (Tue, 17 Jul 2007)
New Revision: 6556

Modified:
   trunk/Catalyst-Plugin-Authentication/
   trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication.pm
   trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Internals.pod
Log:
 r36208 at cain (orig r6089):  jayk | 2007-02-19 18:35:25 +0000
 fix _auth_realms check to actually work now that we create the classdata in 
 the initialize routine
 



Property changes on: trunk/Catalyst-Plugin-Authentication
___________________________________________________________________
Name: svk:merge
   - 4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-Plugin-Authentication:6059
   + 4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-Plugin-Authentication:6089

Modified: trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Internals.pod
===================================================================
--- trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Internals.pod	2007-07-17 16:58:53 UTC (rev 6555)
+++ trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Internals.pod	2007-07-17 16:58:57 UTC (rev 6556)
@@ -325,9 +325,9 @@
 
 =head1 COPYRIGHT & LICENSE
 
-        Copyright (c) 2005 the aforementioned authors. All rights
-        reserved. This program is free software; you can redistribute
-        it and/or modify it under the same terms as Perl itself.
+Copyright (c) 2005 the aforementioned authors. All rights
+reserved. This program is free software; you can redistribute
+it and/or modify it under the same terms as Perl itself.
 
 =cut
 

Modified: trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication.pm
===================================================================
--- trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication.pm	2007-07-17 16:58:53 UTC (rev 6555)
+++ trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication.pm	2007-07-17 16:58:57 UTC (rev 6556)
@@ -184,19 +184,16 @@
 sub _authentication_initialize {
     my $app = shift;
 
-    if ($app->_auth_realms) { return };
-    
+    ## let's avoid recreating / configuring everything if we have already done it, eh?
+    if ($app->can('_auth_realms')) { return };
 
+    ## make classdata where it is used.  
+    $app->mk_classdata( '_auth_realms' => {});
     
     my $cfg = $app->config->{'authentication'} ||= {};
 
     $cfg->{use_session} = 1;
-
-    ## make classdata where it is used.  
-    $app->mk_classdata( _auth_realms => {});
     
-    
-
     if (exists($cfg->{'realms'})) {
         foreach my $realm (keys %{$cfg->{'realms'}}) {
             $app->setup_auth_realm($realm, $cfg->{'realms'}{$realm});




More information about the Catalyst-commits mailing list