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

Tomas Doran bobtfish at bobtfish.net
Tue May 11 07:18:33 GMT 2010

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.


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 :)

> 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..


More information about the Catalyst mailing list