[Catalyst] Difference in way config->{home} is calculated?

Paul Makepeace paulm at paulm.com
Tue May 11 07:47:44 GMT 2010

On Tue, May 11, 2010 at 00:18, Tomas Doran <bobtfish at bobtfish.net> wrote:
> On 11 May 2010, at 03:59, Paul Makepeace wrote:
>> On Mon, May 10, 2010 at 15:19, Tomas Doran <bobtfish at bobtfish.net> wrote:
>>> On 10 May 2010, at 23:23, Paul Makepeace wrote:
>>>> I'm noticing a difference in config->{home} between two installs (one
>>>> is 5.8/18 & other is /23). The latter also has the new ScriptRunner
>>>> code:
>>>> .../IDL-Web
>>>> and .../IDL-Web/script/../lib/IDL/Web
>>>> The latter breaks our app (and is wrong; our html etc is in
>>>> .../IDL-Web/root). I've worked around that with $CATALYST_HOME but
>>>> wondered if this is a bug, or...
>>> Smells like a bug.
>>> Can you give us some more info? Like is this installed or a checkout for
>>> a
>>> start, and if it's a checkout, is Makefile.PL present or has it been
>>> deleted..
>> OK that was a good clue, thanks. I had deleted the inner Makefile.PL
>> as we had an all-encompassing one in a dir above.
> \o/
> There's a comment (and has been for a while) in the Makefile.PL skeleton we
> generate that you'll be in trouble if you delete it :)

This app is quite a lot older than 'a while' :) I think the migration
to Cat was about five years ago. What actually prompted me to toss the
inner Makefile.PL today was something at some stage complaining about
the bareword 'catalyst;'...

>> We have, FWIW,
>> .../  -- main app
>> .../lib, script, etc
>> .../Makefile.PL -- contains all requires etc for all the app & Catalyst
>> .../IDL-Web/  -- Catalyst app
>> .../IDL-Web/Makefile.PL  -- this had very old requires and not much
>> else (apparently!) of use so I nuked it
>> Seems like if I have an empty Makefile.PL in IDL-Web it's all good.
>> Slightly surprising but there we are.
>> Any comments on this? Better ways, etc?
> Well, this is a fairly non-standard layout for a CPAN package - you'd have
> to go through a fairly special little dance in Makefile.PL to generate a
> Makefile which would install things right..
> And Catalyst apps are generally structured like 'proper' CPAN distributions
> so that you can generate a tarball with make dist (including the bundled
> Module::Install components etc so that you don't need Catalyst::Devel when
> you deploy that dist)..
> The more standard thing to do would be to put everything in the same dist,
> but namespace the Catalyst app as IDL::Web ( so it was lib/IDL/Web.pm etc),
> and then you have the appropriate namespaces free to put other things in..
> However detecting 'we are a dist in a checkout' by using the presence of
> Makefile.PL (or dist.ini I believe?) has never struck me as beautiful or
> elegant, but I've never (and I've never heard anyone else) come up with a
> much better idea..

OK fair enough. We actually retrofitted the Cat part into an old .cgi
app where the Cat was a bolt-on and the least disruptive from a
migration point of view was to make its own thing as a sub-dir (I
think mst was actually looking over my shoulder as we did this...).
I'm tempted now to put it all under a single dist.

We serve from source (i.e. git clone) so the dist creation's never
been an issue.

For now it'd be OK to zero out that inner Makefile.PL I guess then so
its contents don't confuse anyone in the future?

Thanks for the advice!


More information about the Catalyst mailing list