[Catalyst] get the path to the home

Chisel Wright chisel at herlpacker.co.uk
Fri Sep 28 14:23:32 GMT 2007


On Fri, Sep 28, 2007 at 03:30:23PM +0300, Octavian Rasnita wrote:
> Hi,
> 
> I have a I18N module in my Catalyst application and I want to get the path 
> to the home directory of the application. Is it possible to get it without 
> hard codding it in that module?
> 
> The module is:
> 
> package MyApp::I18N::ro;

Assuming you can access to $c, I think this is what you want:

  $c->path_to(’’)

It's described in 'perldoc Catalyst' and mentioned in 'perldoc
Catalyst::Plugin::ConfigLoader'

-- 
Chisel Wright
e: chisel at herlpacker.co.uk
w: http://www.herlpacker.co.uk/

   Any fool can use a computer. Many do.



More information about the Catalyst mailing list