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

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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.

In reply to Re: ExtUtils::ModuleMaker by Dog and Pony
in thread ExtUtils::ModuleMaker by simonflk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-19 11:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found