[Catalyst] Project Name

Jess Robinson castaway at desert-island.demon.co.uk
Thu May 11 14:39:53 CEST 2006

On Tue, 9 May 2006, Nathan Kurz wrote:

> On Wed, May 03, 2006 at 07:42:59AM -0500, Bryan Roach wrote:
>> I have a little question that's been bothering me. Why is it that the
>> name of a Catalyst project is used repeatedly? Many file names and
>> folder names include the project name, and every .pm file uses the
>> project name one or more times. If I ever want to rename a project,
>> it's going to be rather tedious. And if I want to copy a Model (for
>> example) from one project to another, I'd have to edit each file to
>> update the project name in multiple places. This isn't a huge deal,
>> but it would be nice to understand the reasoning behind it.
> I thought this was a great question, and though there were some
> responses, they didn't really deal with the problem head on: how does
> one design Catalyst modules that can be reused without hand-editing?
> The best solution I can come up with is just to avoid specific names:
> name all projects "App" and avoid package naming conflicts by
> presuming that everything will be run out of a local directory.

My take on this is the following:

If it's an App that you want to reuse, then it's not really an 
application, but a framework, in which case it should be fine for an 
application built on that framework to have a bunch of files called 
framework_server.pl etc etc.

My solution works like that.. the Books instance of the Anything framework 
is in the dir Books, and has all the Anything modules in it's lib dir. To 
encourage it to find things in the correct places, all I did was set 
ANYTHING_HOME=/path/to/books and everything runs..

As for people trying to extend sample apps to their own toys, I would 
guess that the sample app could provide both an app (concrete instance), 
AND a set of helpers to produce bits. Or, the users should be encouraged 
to run catalyst.pl on their own, and just refer to relevant bits of code..


More information about the Catalyst mailing list