On 3 Mar 2009, at 09:40, Dermot wrote:

Hi,

Running prove over my t directoty is giving me errors:

Error:  Can't locate object method "config" via package "MyApp" at
lib/MyApp/Model/DB.pm line 7.

<snip>

Can't locate object method "path_to" via package "MyApp" at
lib/MyApp/View/TT.pm line 20.

<snip>

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.

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.

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/

Reply via email to