2009/3/3 Tomas Doran <[email protected]>:
>
> 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.
_______________________________________________
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/