[Catalyst] Project Name

Kieren Diment diment at gmail.com
Wed May 10 01:24:31 CEST 2006


Mass renaming is quite simple on a system that has find:

from the top level of your application:

find . -exec perl -p -i -e 's/MyApp/MyNewApp/g' {} \;

Tada! Fixed.


On 10/05/06, Nathan Kurz <nate at verse.com> 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.
>
> 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)
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060510/d430da4c/attachment.htm 


More information about the Catalyst mailing list