[Catalyst] Authentication gotchas

Christopher H. Laco claco at chrislaco.com
Fri Dec 16 19:55:28 CET 2005


Michael Richards wrote:
> On 12/16/05, Yuval Kogman <nothingmuch at woobling.org> wrote:
>>
>> I think the problem is actually with Catalyst though - there's no
>> benefit in mushing the plugin and action namespaces together, in my
>> opinion.
>>
>> Perhaps it's too late for that now, though.
>>
>>
> 
> 100% agreed. Perhaps plugin writers could come up with a convention for
> prefixing their function names to help avoid conflict in the future.
> 

I agree. Or even better, don't polute the $c namespace unless there is
one and only ever one module that will do it.

Take C::P::FormValidator and C::P::FormValidator::Simple.
The both claim $->form. Great. That's what plugins do right?

The downside of course is that as a 3rd party scaffold writer, I can't
use either C::P::FormValidator nor C::P::FormValidator::Simple in my
code. If I choose either one for my generated scaffold code, it may
clash with other parts of the users Catalyst app that may user the other
module, and there can only be on $c->form.

To put that another way. You have your own MyApp that uses $c->form
from C::P::FormValidator. You add cart code using the Handel scaffolding
that wants $c->form, but it wants C::P::FormValidator::Simple's
$c->form. Boom.

I think the auth stuff is different because it is itself pluggable
underneath while still using the same C::P::Authentication -> $c->login.

But I digress....
-=Chris

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3178 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20051216/ced77ffc/smime.bin


More information about the Catalyst mailing list