[Catalyst] Basic help with "deployment"

John M. Dlugosz wxju46gefd at snkmail.com
Wed Mar 16 06:36:08 GMT 2011

I'm going through the Packt Publishing book, and I can't help but wonder first of all why 
I had to return to it, instead of finding this in the online documentation?  I find tips 
on configuring fastcgi, but it completely leaves out all mention of the "makefile" and the 
available options!  I did find some tips on using PAR instead, but I want to do the 
regular way since I should install modules on the server machine and don't need to end-run 
around cpan.

So, following chapter 9 in that book, it states to run

     $ perl Makefile.PL
     $ make distclean
but distclean removes the makefile itself, so make it again.
     $ make manifest
inspect the MANIFEST file for junk and create a skip file, as needed.  I notice the 
mysterious 'inc' directory is being included, but 'blib' is not.  Finally,
     $ make dist
and you get a tar.gz file.

Then it states to copy the tarball to the server, and issue:

     $ tar xzvf MyApp-0.01. tar. gz
     $ cd MyApp
     $ perl Makefile.PL
     $ make && make test

Ah, but what is extracted is not a subdirectory called MyApp, but MyApp-0.01.  This won't 
match the following instructions, and naturally doesn't match the Apache config file.  Now 
maybe I should "go with it" and generate /var/www/MyApp/MyApp-0.01/files, and point all 
the Apache lines to the inner directory?  This would facilitate switching them easily.  
Running tar from /var/www is problematic because doing this as a user can't create the 
directory, and doing it as root will create all the subdirs as root, not as the user.  And 
it's called MyApp-0.01, not MyApp.

Now, does 'make' by itself load the Perl dependancies?  Copying it from dev to the Apache 
directory on the same machine, naturally everything was found, and it told me it checked.  
But I seem to recall there being a different make item that specifically populated any 

Now, another question I need settled before I proceed:  I found that I need to run cpan -i 
Module as root, because sometimes it needs to create directories.  Does that mean that 
this 'make' step needs to be done as root?  That's also why I want to use a make step that 
only does the Perl dependencies, so I can do that separately.

Finally, the favicon is missing when I serve the app via Apache/fastCGI.  The file is 
under static/favicon.ico, it just doesn't work.  In general, how do I verify that Apache 
is indeed serving static content without going through the app, as intended?


More information about the Catalyst mailing list