[Catalyst] Plugin::Authentication vs Authentiaction

Joel Bernstein joel at fysh.org
Mon Nov 10 14:26:13 GMT 2008


2008/11/10 Joel Bernstein <joel at fysh.org>:
> 2008/11/10 Alex Povolotsky <tarkhil at over.ru>:
>> Joel Bernstein wrote:
>>> The fine manual states:
>>> If your plugin starts with a name other than Catalyst::Plugin::, you
>>> can fully qualify the name by using a unary plus.
>>>
>>> So you'd do:
>>>
>>> use Catalyst qw/
>>>  Foo # loads C::Plugin::Foo
>>>  +Catalyst::Authentication::Credential::Authen::Simple # loads the
>>> module you wanted
>>> /;
>>>
>>
>> That's not enough. Apparently, Plugin::Authentication is different from
>> Authentication, and slightly not compartible.
>
> Er... what? That's nothing to do with what you asked. Why are you
> loading Plugin::Authentication if you don't want to use it? I answered
> your question of "how do I load C::Authentication::Blah via use
> Catalyst qw(....);".
>
> If you'd like a different answer, ask a different question.


So, strictly speaking, my answer to your question of "how do I load a
plugin not called C::Plugin::Blah" was accurate. In fact, interms of
how to load the auth backends, it's completely false. And I do
understand your question now.

The answer is, Catalyst::Authentication::Credential::Authen::Simple is
not a "plugin". So you don't load it like a Plugin since you *don't*
want MyApp->isa("Catalyst::Authentication::Credential::Authen::Simple")
to be true. What you do is, load C::Plugin::Authentication, and then
in your application config you have a section for
"Plugin::Authentication" which tells it, among other things, which
backends for its various modular features to load. See TFM for
C::Plugin::Authentication and the Cookbook.

HTH, and sorry for the confusion earlier.

/joel



More information about the Catalyst mailing list