[Catalyst] path_to() and symbolic links

Carl Franks carl at fireartist.com
Tue May 9 09:44:21 CEST 2006


On 08/05/06, marcus <marcus.baker at gmail.com> wrote:
> I'm having issues with path_to() correctly resolving in issues where I
> access my fastcgi script out of a symlink to the actuall catalyst
> script directory.
>
> Suppose my Catalyst application is in /usr/local/MyApp, and my apache
> document root is in /srv/www.  If I symlink /srv/www/myapp to
> /usr/local/MyApp/script and try accessing http://localhost/myapp,
> path_to() seems to resolve everything relative to /srv/www as opposed
> to /usr/local/MyApp.
>
> Is there a way around this?

I had the same issue recently, and fixed it with this in lib/MyApp.pm:
BEGIN {
    $ENV{CATALYST_HOME} = '/usr/local/MyApp';
}



More information about the Catalyst mailing list