Michael Schilli > Module-Rename > module-rename

Download:
Module-Rename-0.03.tar.gz

Annotate this POD

CPAN RT

New  1
Open  0
View Bugs
Report a bug
Source  

NAME ^

    module-rename - Rename Perl module distributions

SYNOPSIS ^

    $ module-rename Old::Name New::Name Old-Name-Distro-Dir

DESCRIPTION ^

Have you ever created a module distribution, only to realize later that the module hierarchary needed to be changed? All of a sudden, Cool::Frobnicator didn't sound cool anymore, but needed to be Util::Frobnicator instead?

Going through a module's distribution, changing all package names, variable names, and move the directories around can be a tedious task. Module::Rename comes with a script module-rename which takes care of all this:

    $ ls
    Cool-Frobnicator-0.01/

    $ module-rename Cool::Frobnicator Util::Frobnicator Cool-Frobnicator-0.01
    Cool-Frobnicator-0.01/lib/Cool is empty and can go away.

Done. The directory hierarchy has changed:

    $ ls -R
    Util-Frobnicator-0.01/
    ...
    Util-Frobnicator-0.01/lib/Util/Frobnicator.pm

... and so has the content of all files:

    $ grep "package" Util-Frobnicator-0.01/lib/Util/Frobnicator.pm
    package Util::Frobnicator;

Things to Keep in Mind

OPTIONS ^

-v

Verbose mode.

-h

Show the script's version and manual page.

LEGALESE ^

Copyright 2005 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR ^

2005, Mike Schilli <cpan@perlmeister.com>