2009/5/24 Tomas Doran <[email protected]>
> Ivan Wills wrote:
>
>> I have finally worked out what was causing me the problem, if I take away
>> the :Arg(0) from the sub definition the error goes away.
>>
>> Does any one know what :Arg(0) is doing that might be causing this?
>>
>
> Erm, which subroutine definition?
>
> I just generated a TestApp, and changed 'sub index : Args(0)' to 'sub index
> : Arg(0)' and it works fine.
>
> Can you show us the code for a controller I can add to a TestApp which
> breaks it or something?
>
>
> Cheers
> t0m
>
>
> _______________________________________________
> List: [email protected]
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/[email protected]/
> Dev site: http://dev.catalyst.perl.org/
>
The code was something like this
sub index :Path :Arg(0) {}
sub add :Path :Arg(0) {}
To get it working I changed this to
sub index :Path :Arg(0) {}
sub add :Path {}
If I understand it correctly the :Arg attribute takes extra path parameters
and converts them to method parameters so I can't see why the problem would
occur.
Ivan
--
email/jabber: [email protected]
/
/ _ _
/ \ / | | | |
/ \/ \_| | |
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/