[Catalyst] Can't locate object method 'path_to'... and another!

Kevin White kevin at theconfused.co.uk
Tue Mar 14 23:35:34 CET 2006


Hi Folks,

I have just started using Catalyst and as a long term Mason user I am  
using the Catalyst::View::Mason stuff. I am trying to use a different  
component root and am following instructions similar to that in the  
tutorial for TT. I am trying to use path_to to allow for me deploying  
the thing somewhere else but I am running into a couple of problems.  
The app modules is:

package africa;

use strict;
use Catalyst qw/-Debug DefaultEnd FormValidator/;
use Text::Markdown;
use Time::Piece;
use Date::Calc qw( English_Ordinal );

our $VERSION = '0.01';

africa->config(
     name => 'Africa Now',
     'V::Mason' => {
         comp_root => __PACKAGE__->path_to( 'comp' )
     }
);

africa->setup;

I get the following error:

Can't locate object method "path_to" via package "africa" at /Library/ 
WebServer/Documents/Development/africa/script/../lib/africa.pm line 11.

I tried the absolute path which allowed the server to start but then  
Mason is failing as it can't seem to find the components.

Any help would be appreciated, thanks

Kevin




More information about the Catalyst mailing list