[Catalyst] Not getting passed arguments in $c->user methods

Steve Cayford cayfo001 at umn.edu
Thu Jan 11 22:39:05 GMT 2007


Matt S Trout wrote:
> 
> On 11 Jan 2007, at 19:35, Steve Cayford wrote:
> 
>> Matt S Trout wrote:
>>>
>>> On 8 Jan 2007, at 23:55, Steve Cayford wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm fairly new with Catalyst, so please forgive me if this is obvious.
>>>>
>>>> I'm using a DBIx::Class "Person" class for the authentication store.
>>>> I've extended this Person class using a custom component. (This is
>>>> running on mod_perl 1.29 and Apache 1.3.33 on Debian stable.)
>>>>
>>>> That all works well enough, I can access the class and its methods via
>>>> $c->user. However, the methods are not getting any arguments other than
>>>> $self.
>>>>
>>>> In a catalyst action I tried this code:
>>>>
>>>> -------
>>>>
>>>> $c->log->info( $c->user->return_arg('first') );
>>>
>>> This should be
>>>
>>> $c->user->obj->return_arg('first');
>>>
>>
>> Okay, thanks that works. I see where the call is going now. (Took me a
>> while to figure out the code was in
>> C::P::Authentication::Store::DBIC::User)
>>
>> Is there a reason that AUTOLOAD in that class forwards the call as
>> "$self->obj->$method;" rather than "$self->obj->$method(@_);"?
>>
> 
> Hm. I just looked on CPAN and it -does- pass @_ - do you have an old
> version?

Ah, yes indeed. I'll update. Thanks.

-Steve



More information about the Catalyst mailing list