fixed a nasty bug in compat mode with store::minimal. From the comments left in ...
authorJos Boumans <kane@cpan.org>
Thu, 5 Jun 2008 16:30:54 +0000 (16:30 +0000)
committerJos Boumans <kane@cpan.org>
Thu, 5 Jun 2008 16:30:54 +0000 (16:30 +0000)
commit692dcea459fcc9947180b0e4b951740260a60eb8
tree270292788e9888b6960e24251aa8ac27ab974328
parent9667182406030a650e1799b6856b8fda9f7b715c
fixed a nasty bug in compat mode with store::minimal. From the comments left in ->setup():

### If a user does 'use Catalyst qw/Authentication::Store::Minimal/'
### he will be proxied on to this setup routine (and only then --
### non plugins should NOT have their setup routine invoked!)
### Beware what we pass to the 'new' routine; it wants
### a config has with a top level key 'users'. New style
### configs do not have this, and split by realms. If we
### blindly pass this to new, we will 1) overwrite what we
### already passed and 2) make ->userhash undefined, which
### leads to:
###  Can't use an undefined value as a HASH reference at
###  lib/Catalyst/Authentication/Store/Minimal.pm line 38.
###
### So only do this compatibility call if:
### 1) we have a {users} config directive
###
### Ideally we could also check for:
### 2) we don't already have a ->userhash
### however, that's an attribute of an object we can't access =/
lib/Catalyst/Authentication/Store/Minimal.pm
lib/Catalyst/Plugin/Authentication.pm
t/lib/AuthRealmTestApp.pm
t/lib/AuthRealmTestAppCompat.pm [new file with mode: 0644]
t/live_app_realms_compat.t [new file with mode: 0644]