Octavian Rasnita wrote:
Can't locate object method "path_to" via package "MyApp::View::TT" at D:/web/MyApp/scr
ipt/../lib/MyApp/View/TT.pm line 7.

It works if I use MyApp->path_to() instead...

Generally, it would be also very helpful if we could find which methods are offered by a certain $c object in a certain place. Is there a way for doing this?

I think you're very confused here.

Each model, view and controller is its own package, and nothing to do with $c (which @ISA Catalyst), doesn't inherit from Catalyst etc.

Therefore calling methods which exist in code for Catalyst _will never_ work for anything which isn't the MyApp class, or $c (which is an instance of that class).

If you're confused about what inherits from what, then try the following code snippet:

use MRO::Compat;
warn(__PACKAGE__ . ' inherits from: ' . join(', ', @{ mro_get_linear_isa(__PACKAGE__) });

Which should help to clarify what inherits from what.

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