module-starter
module-starter copied to clipboard
Wishlist: Start module with pre-existing .pm
Would it be a great deal of effort to write in the use of a pre-existing .pm file to start a module? I have many I would like to package easily, and module-starter would be the easiest to use; if it would use my pre-existing .pm files.
module-starter --module=Neat::Thing --dir=pkgs --file=mods/lib/Neat/Thing.pm
The .pm would be copied into the package. Whatever is in the .pm could be plugged into the various files in package being started like the version, used modules, and subroutines.
package Neat::Thing;
use v5.10.0;
use strict;
use warnings;
use Exporter qw(import);
use File::ShareDir qw(module_dir);
use String::Util qw(trim);
sub neat_thing {
...
}
It might even be able to do nifty things like see the use of File::ShareDir
and grab any files in the shared directory and add File::ShareDir::Install
where needed. In this case, the shared directory would be mods/lib/auto/Neat/Thing/
.
This would make packaging my pre-existing .pm files a lot easier.