in reply to Adding a class to a module - Can Module::Starter or Dist::Zilla help?
"But when i try to use it in Windows XP, it seems to not understand that it should just add a module to the distro. It creates a new distro instead. I might not have set it up correctly ..."
Please show your .module-starter/config file and the full command you used. Without this, we can't tell if the setup is correct or if you used it correctly. For instance, modules have colons (e.g. --module=Some::Class) whereas distros have a hyphen (e.g. --distro=Some-Class) - perhaps those got mixed up on your commandline.
While I appreciate that your question specifically asks about "adding to an existing module", I'll just point out that you can create multiple modules in a single distribution without using any plugins, e.g.
module-starter --module=My::Example,My::Example::Class --distro=My-Exa +mple
Using the plugin Module::Starter::Smart, I can run
module-starter --module=My::Example
My::Example has boilerplate with author and email (from config). I added a little POD text (to later check this wasn't being overwritten) and ran
module-starter --module=My::Example::Class --distro=My-Example
My::Example was not overwritten and My::Example::Class has boilerplate with author and email (from config).
This appears to cover your "... have all folders and files created, as well as the boilerplates adapted." requirement.
For your specific customisations (e.g. logger code), perhaps consider writing your own plugin. You may find Module::Starter::Plugin and Module::Starter::Plugin::Template to be useful if you choose to do this. Taking a look at the source of existing plugins (e.g. Module::Starter::Smart and Module::Starter::PBP) may also be helpful.
I noticed that Module::Starter::Smart has:
UPDATE: This plugin only covers the simplest use cases. For advanced usage, check out Module::Starter::AddModule.
I'm not familiar with that module - it may be of use to you.
-- Ken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Adding a class to a module - Can Module::Starter or Dist::Zilla help?
by Anonymous Monk on Aug 12, 2012 at 09:31 UTC | |
|
Re^2: Adding a class to a module - Can Module::Starter or Dist::Zilla help?
by mascip (Pilgrim) on Aug 13, 2012 at 09:30 UTC | |
by kcott (Archbishop) on Aug 13, 2012 at 15:09 UTC | |
by mascip (Pilgrim) on Aug 13, 2012 at 17:35 UTC | |
by mascip (Pilgrim) on Aug 13, 2012 at 19:24 UTC | |
by mascip (Pilgrim) on Aug 14, 2012 at 09:53 UTC | |
by osirisgothra (Initiate) on Oct 27, 2014 at 16:44 UTC |