Subject: | Settings in configuration file is being ignored |
Either I must be doing something completely wrong, or
Catalyst::Plugin::Authentication is silently ignoring my configuration
file. I'm running Strawberry Perl 5.10.1 on Windows Vista.
Catalyst::Runtime is version 5.80020.
When using the following configuration (MyApp.conf) the module ignores
my settings:
<Plugin::Authentication>
<realms>
<default>
class SimpleDB
user_model DB::User
password_type clear
</default>
</realms>
</Plugin::Authentication>
But when adding it directly to MyApp.pm (the base module that extends
Catalyst) like this it works without any problems:
__PACKAGE__->config(
name => 'MyApp',
# Disable deprecated behavior needed by old applications
disable_component_resolution_regex_fallback => 1,
'Plugin::Authentication' => {
'realms' => {
'default' => {
'class' => 'SimpleDB',
'user_model' => 'DB::User',
'password_type' => 'clear'
}
}
}
);
At line 229 in Catalys/Plugin/Authentication.pm it retrieves the
specific configuration. But it simply doesn't exist at that point yet,
as it's undefined. As soon as I configure the application with the
config() method it suddenly works.
So it seems like this modules setups too early?