[Catalyst] Project Name

Nathan Kurz nate at verse.com
Tue May 9 23:15:08 CEST 2006


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.

Is there a better solution?  To make the question more concrete,
presume (as I am) that I'm writing a simple signup/registration to be
used as a sample app and base for others.  How should I structure it?

Ideally, I'd like it to be possible for people to untar it, test it,
customize a configuration file to match their project name, and then
start adding controllers without renaming and searching-and-replacing.

Thanks!

Nathan Kurz
nate at verse.com

(I don't think __PACKAGE__ is the answer here, since it doesn't solve
the file names question nor the 'package' and 'use' lines in the code)



More information about the Catalyst mailing list