View on
MetaCPAN
Boris Zentner > Apache2-PageKit-2.15 > scripts/pkit_rename_app.pl

Download:
Apache2-PageKit-2.15.tar.gz

Annotate this POD

View/Report Bugs
Source  

Start a new Application with Apache::PageKit ^

Overview ^

This script renames a Apache::PageKit Application and all the modules. Bellow $pkit_root/Model.

Requirements ^

You need a working Apache::PageKit application. Not running, you need only the files.

Usage ^

  pkit_rename_app.pl MyNewAplicationName
  pkit_rename_app.pl pkit_root MyNewAplicationName
  pkit_rename_app.pl --svn pkit_root MyNewAplicationName
  pkit_rename_app.pl --svk pkit_root MyNewAplicationName

MyNewAplicationName is the new name for your application.

pkit_root is the name of root of your application. That is the Directory where Config, Model, View and Content is.

Description ^

The script renames the application INPLACE so do it on a backup. It reads the Config/Config.xml to figure out what your old name is. Then all is the file Config/Config.xml and all your *.pm files are scanned and and replaced with your new App's name. As a last step your directory Model/oldname is moved to Model/newname thats it.

This might become handy if you start a new application and you can reuse a good part of an older one. It is also helpfull if you work on more sites and you have some virtualhosts running Apache::Pagekit applications.

Example ^

Now a little example that clones the example site to anotherone.

  cp -r eg a_new_site
  pkit_rename_app.pl a_new_site MyNewSite

or with version control svn co http://mysvn/repository/pagekit/trunk newapp cd newapp ./scripts/pkit_rename_app.pl --svn eg MyNewApp

or with svk version control svk co //depotpath/pagekit/trunk newapp cd newapp ./scripts/pkit_rename_app.pl --svk eg MyNewApp

AUTHOR ^

  Boris Zentner bzm@2bz.de
syntax highlighting: