Subject: | patch to add additional examples to the documentation |
Hi,
I'm so glad you wrote this plugin -- I've been wanting this
functionality in Module::Starter for a long time.
It took me a while to understand exactly how to use this plugin,
however, and I wrote up some use cases that I would like to contribute
as additional documentation for Module::Starter::Smart.
I've attached a patch file. Thanks!
Dave
Subject: | Smart.pm.diff |
38a39,126
> =head2 Adding a new module to an existing distribution
>
> Say you have an existing distro, Goof-Ball, and you want to add a new module, Goof::Troop.
>
> % ls -R Goof-Ball
> Build.PL Changes MANIFEST README lib/ t/
>
> Goof-Ball/lib:
> Goof/
>
> Goof-Ball/lib/Goof:
> Ball.pm
>
> Goof-Ball/t:
> 00.load.t perlcritic.t pod-coverage.t pod.t
>
> Go to the directory containing your existing distribution and run module-starter, giving it the names of the existing distribution and the new module:
>
> % module-starter --distro=Goof-Ball --module=Goof::Troop
> Created starter directories and files
>
> % ls -R Goof-Ball
> Build.PL Changes MANIFEST README lib/ t/
>
> Goof-Ball/lib:
> Goof/
>
> Goof-Ball/lib/Goof:
> Ball.pm Troop.pm
>
> Goof-Ball/t:
> 00.load.t perlcritic.t pod-coverage.t pod.t
>
> Troop.pm has been added to Goof-Ball/lib/Goof.
>
> =head2 Placing an existing module into a new distribution
>
> Let Foo::Baz be your existing module, and Globbo be the new distribution you will be creating.
>
> Put Foo/Baz.pm in a lib directory if it's not already.
>
> % mkdir lib
> % cp -R /some/other/location/Foo ./lib
> % ls -R ./lib
> Foo/
> ./lib/Foo:
> Baz.pm
>
> Make sure you're in the parent directory that contains the lib directory. Then make your new distro, but give module-starter the name of your existing module, too:
>
> % module-starter --distro=Globbo --module=Foo::Baz
> Created starter directories and files
>
> % ls -R Globbo
> Build.PL Changes MANIFEST README lib/ t/
>
> Globbo/lib:
> Foo/
>
> Globbo/lib/Foo:
> Baz.pm
>
> Globbo/t:
> 00.load.t perlcritic.t pod-coverage.t pod.t
>
> Foo/Baz.pm has been added to Globbo's lib directory.
>
> =head2 Adding an existing module to an existing distribution
>
> Say you have an existing distro, Foo::Bar, and you want to add to it an existing module, Foo::Baz:
>
> % module-starter --module Foo::Baz --distro=Foo-Bar
> Created starter directories and files
>
> % ls -R Foo-Bar
> Build.PL Changes MANIFEST README lib/ t/
>
> Foo-Bar/lib:
> Foo/
>
> Foo-Bar/lib/Foo:
> Bar.pm Baz.pm
>
> Foo-Bar/t:
> 00.load.t perlcritic.t pod-coverage.t pod.t
>
> Foo/Baz.pm has been placed in lib/Foo.
>