FAQ
Hi,

I encountered some strange behaviour in my Catalyst App regarding
determination of the home directory.
The App is the result of an attempt to manually merge two apps which I
know is error-prone in the first place but I can't help it at the
moment. And because the error I encountered seems to happen early in the
initialization cycle I think it may be resolvable.
The two Apps as well as the resulting App run with mod_perl but the
behavior is the same when starting the App with the test server via
script/myapp_server.pl.
So I created a directory /home/MyTest on the server and put the Modules
in there in accordance to the Catalyst directory structure.
Now Catalyst sets the home directory to /home/MyTest/lib/MyApp instead
of the expected /home/MyTest. As a quick fix I tried to use the -Home
flag as follows:

use Catalyst qw/-Debug
-Home=/home/MyTest
# Plugins below


/;

which yielded a syntax error (did I misunderstand something in "perldoc
Catalyst"?). I then set the environment variable MYAPP_HOME to
/home/MyTest which was simply ignored by Catalyst. As a last resort I
suspected it had to do with my home directory being /home/MyTest instead
of /home/MyApp, so I put a symbolic link "MyApp" into /home/Testdir/
that points to /home/MyTest/ and changed the mod_perl configuration
accordingly to no effect.
As the configuration was simply copied from one of the old Apps and both
set the home directory as expected, I thought the new App wouldn't go
haywire at this point.

Are there any docs that are more verbose about the initialization than
Catalyst::Manual::Internals that I haven't found yet (apart from digging
through the source)?
Do you have any ideas why this might happen?

Thanks,

Jochen

Search Discussions

  • Matt S Trout at Feb 5, 2008 at 8:39 am

    On Mon, Feb 04, 2008 at 10:20:29AM +0100, Jochen Luig wrote:
    Hi,

    I encountered some strange behaviour in my Catalyst App regarding
    determination of the home directory.
    The App is the result of an attempt to manually merge two apps which I
    know is error-prone in the first place but I can't help it at the
    moment. And because the error I encountered seems to happen early in the
    initialization cycle I think it may be resolvable.
    The two Apps as well as the resulting App run with mod_perl but the
    behavior is the same when starting the App with the test server via
    script/myapp_server.pl.
    So I created a directory /home/MyTest on the server and put the Modules
    in there in accordance to the Catalyst directory structure.
    Now Catalyst sets the home directory to /home/MyTest/lib/MyApp instead
    of the expected /home/MyTest. As a quick fix I tried to use the -Home
    flag as follows:
    Don't delete the Makefile.PL

    Catalyst works with installed apps as well as running the app from an
    unpacked dist. Since Makefile.PL isn't installed, it uses that to work out
    whether you've installed it or not.

    Since without the Makefile.PL you also can't run 'make test' or 'make
    installdeps' it's pretty insane to delete it anyway - so don't :)

    --
    Matt S Trout Need help with your Catalyst or DBIx::Class project?
    Technical Director http://www.shadowcat.co.uk/catalyst/
    Shadowcat Systems Ltd. Want a managed development or deployment platform?
    http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
  • Jochen Luig at Feb 5, 2008 at 10:11 am

    Matt S Trout schrieb:
    Don't delete the Makefile.PL
    Wow, that was easy. Thanks!

    Wouldn't have thought of that myself in hours of banging my head against
    the wall to come.

    Jochen

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedFeb 4, '08 at 9:20a
activeFeb 5, '08 at 10:11a
posts3
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

Jochen Luig: 2 posts Matt S Trout: 1 post

People

Translate

site design / logo © 2022 Grokbase