[Catalyst] config

Octavian Rasnita orasnita at gmail.com
Fri Dec 22 00:35:06 GMT 2006


Hi,

I have tried the following configuration in the main package of the
application, as in Catalyst::Manual::Tutorial:

'INCLUDE_PATH' => __PACKAGE__->path_to('templates'),

where the dir "templates" is in the main dir where /root is:
e:/web/TranzactiiBursiere/templates

But the program doesn't work, telling that the template file couldn't be
found.
If I replace __PACKAGE__->path_to('templates') with the path I've specified
above, all works fine.

I thought that maybe __PACKAGE__->path_to('templates') points to another
location, so I have put it in stash, then printed, but it points to the same
location (of course with dirs separated by \ instead of /).

Even the error that tells that the template was not found shows that the
configuration points to the right directory, as you might see below.


Why does it work only when specifying the full path literally, and not using
the path_to() method?

Here is the error page, the part regarding the configuration:

Config
{
'name' => 'Tranzactii Bursiere',
'View::TT' => {
'INCLUDE_PATH' => bless( {
'file_spec_class' => undef,
'volume' => 'E:',
'dirs' => [
'',
'web',
'TranzactiiBursiere',
'templates'
]
}, 'Path::Class::Dir' )
},
'static' => {
'no_logs' => 1,
'ignore_dirs' => [],
'include_path' => [
bless( {
'file_spec_class' => undef,
'volume' => 'E:',
'dirs' => [
'',
'web',
'TranzactiiBursiere',
'root'
]
}, 'Path::Class::Dir' )
],
'debug' => 1,
'ignore_extensions' => [
'tmpl',
'tt',
'tt2',
'html',
'xhtml'
],
'dirs' => [],
'mime_types' => {}
},
'root' => $VAR1->{'static'}{'include_path'}[0],
'home' => bless( {
'file_spec_class' => undef,
'volume' => 'E:',
'dirs' => [
'',
'web',
'TranzactiiBursiere'
]
}, 'Path::Class::Dir' )
}

Tranzactii Bursiere on Catalyst 5.6902



Octavian




More information about the Catalyst mailing list