First of all, thanks for this. I've been using your script for a while, because I find this way much easier than the H2XS way. I just discovered that a new feature has been added to ExtUtils::ModuleMaker that I thought I'd share with the rest of you.
If you add
compact => 1,
to the arguments to
Generate_Module_Files it produces the directory "Foo-Bar" instead of "Foo/Bar", which apparently is what you want to make it easier to make for instance a CPAN distribution (see link below).
It still doesn't add the version number, as recommended in the excellent How to make a CPAN Module Distribution, but now it is much easier to do that too. The following lines, added to your script (together with the "compact" argument) takes care of this:
my $dir_name = $module_name;
$dir_name =~ s/::/-/g;
print STDERR "renaming '$dir_name' to '$dir_name-$version'\n";
rename $dir_name, "$dir_name-$version"
or warn "Could not rename '$dir_name' to '$dir_name-$version': $!"
+;
Just so we all can be even more lazy... :)
Note that you must upgrade ExtUtils::ModuleMaker to a newer version for this to work, I am using version 0.204, while whatever the last one I had was, did not have the compact parameter.
You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.