[Catalyst] Can't locate method ??? via MyApp
Dermot
paikkos at googlemail.com
Tue Mar 3 10:22:19 GMT 2009
2009/3/3 Tomas Doran <bobtfish at bobtfish.net>:
>
> On 3 Mar 2009, at 09:40, Dermot wrote:
>
>> Hi,
>> Do I need to 'use MyApp'?
>
> Yes.
>
>> I am not sure why it's not searching back up
>> the tree to find these method from Catalyst.
>
> Loading a leaf node in your object graph does not imply loading all of its
> parent nodes.
Is this because of use base? I was under the impression that the
inheritance search would go up to the parent.
> Unless you do something which implicitly loads MyApp first, then these
> classes won't work. You'll be able to see this by using perl -c
> lib/MyApp/View/TT.pm, which will break.
perl -c lib/MyApp/View/TT.pm is syntax OK.
perl -Ilib -MMyApp::Model::DB -e "print MyApp::->config->{"connect_info"}"
Can't locate object method "config" via package
I guess -c doesn't checks for methods actually exist.
use MyApp has fixed it.
Thanx Tomas.
Dp.
More information about the Catalyst
mailing list