Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^5: Adding a class to a module - Can Module::Starter or Dist::Zilla help?

by mascip (Pilgrim)
on Aug 13, 2012 at 19:24 UTC ( [id://987188]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Adding a class to a module - Can Module::Starter or Dist::Zilla help?
in thread Adding a class to a module - Can Module::Starter or Dist::Zilla help?

I found that i could use the --plugin=Module::Starter::Smart argument, to use the plugin. Now it works properly.

I still don't know why the configuration line's plugin: Module::Starter::Smart didn't work previously. While all the others worked properly.

Edit: Well, i get it now. I can use one plugin or the other, but not both, as they inherit from the same class (Module::Starter::Simple). So, Module::Starter::PBP and Module::Starter::Smart won't work simultaneously.
Well... They will, if i cheat. I just changed Module/Starter/Smart.pm, so that it inherits from Module::Starter::PBP, instead of Module::Starter::Simple. It works !

Is there any way to make a cleaner solution, from this dirty one?

Replies are listed 'Best First'.
Re^6: Adding a class to a module - Can Module::Starter or Dist::Zilla help?
by mascip (Pilgrim) on Aug 14, 2012 at 09:53 UTC

    Ok, i found my solution for now. It also works when i do the opposite inheritance : when Module::Starter::PBP inherits from Module::Starter::Smart.

    So, i'll create my own plugin, maybe called Module::Starter::PBP::Perso. It will just be a copy-paste of Module::Starter::PBP, inheriting from MS-Smart instead of MS-Simple.

    And anyway, i'll have to read the source code and change little details in the module, in order to add the creation of the ./t/My/Example/Class/01_unit_test.t file, as well as ./t/lib My/Example/Class/Builder.pm. And i'll try to add my Log4perl configuration stuff at the same time.

    ~ ~ ~ I'm still curious on whether Dist::Zilla proposes something to do this.

Re^6: Adding a class to a module - Can Module::Starter or Dist::Zilla help?
by osirisgothra (Initiate) on Oct 27, 2014 at 16:44 UTC

    I appreciate this post immensely! I dont know if this helps to identify any additional issues, but local::lib can add confusion with this on top of use of multiple prefixes. Of course this means multiple module destinations, depending on "package" install or "manual" install. When I say "package" i mean stuff like apt, yum, rpm.. manual here refers to using cpan(p/m) and the like, which isn't what you would usually imagine.

    Furthermore, I never came across an initial install sequence that would result in ::Smart being used instead of ::Simple (without the --plugin argument, or script editing directly).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://987188]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-24 07:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found