tokuhirom / Minilla

Authorizing tool for CPAN modules
https://metacpan.org/release/Minilla
Other
98 stars 65 forks source link

Feature Request: Minilla:CLI::Newmodule #283

Closed srchulo closed 4 years ago

srchulo commented 4 years ago

When I need to create another module in my dist, I just copy and paste the Module.pm that Minilla generated for me. Sometimes I've already edited this file, and then cleaning up the new copy can be annoying. It would be great if there was a cli command like newmodule or module to use the same Module.pm template to create a new module in the same dist:

minil newmodule MyApp::Util
skaji commented 4 years ago

I'm not sure it is worth adding newmodule to Minilla distribution itself.

You may create Minilla::CLI::Newmodule by yourself, and then minil newmodule works.

srchulo commented 4 years ago

Ah, cool. Didn't know that.

Just wondering, do you not run into this issue of creating files beyond the original in your module? Or is there another way that you solve this that you don't think it's worth adding to Minilla?

skaji commented 4 years ago

For me, my editor takes care of that.

srchulo commented 4 years ago

Okay, thanks. I'll go ahead and close.

Would you mind telling me what editor you use? That sounds useful :)

karenetheridge commented 4 years ago

FWIW -- I use Dist::Zilla with a custom minting profile, and Dist::Zilla has a 'new module' feature: dzil add Foo::Bar which uses the module template in the profile to create a new .pm file. Even though I have a customized .pm template, I never use this new module feature, as it's a simple enough task to just create a new .pm file manually and copy the few lines of boilerplate from the main module into the new one.

skaji commented 4 years ago

vim 😉

srchulo commented 4 years ago

@karenetheridge Thanks for letting me know about that! I'd like to keep using Minilla, so maybe I will just have to do the copy and paste :)

@skaji, is that a vim plugin?