Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Module Building 5.6 vs 5.8 or 5.10

by jblakey (Novice)
on Jun 26, 2008 at 18:04 UTC ( [id://694230]=perlquestion: print w/replies, xml ) Need Help??

jblakey has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I've got a rather large in-house module tree that i've automated the building/packing/pushing-out of. Usually, to create a new module in perl 5.6, i use "h2xs -AXn This::Module::Name", and this directory structure gets created...

./This/Module/Name/

Now, in perl 5.8 and later, i've noticed h2xs produces a flatter structure:

./This-Module-Name/

Is there anyway to force the multi-level path creation in perl 5.8? I don't really want to have to redo all my module stuff just because of this change (although, i suppose i could write my own crappy h2xs-module-making-kinda-thingy as somewhat of a last resort). This is on Windows, by the way...

Thanks for listening,
jason

Replies are listed 'Best First'.
Re: Module Building 5.6 vs 5.8 or 5.10
by tachyon-II (Chaplain) on Jun 26, 2008 at 18:25 UTC

    The structure now generated by h2xs is not actually flat. It is:

    This-Module-Name/ This-Module-Name/lib/ This-Module-Name/lib/This/ This-Module-Name/lib/This/Module/ This-Module-Name/lib/This/Module/Name.pm This-Module-Name/Makefile.PL This-Module-Name/Changes This-Module-Name/t etc

    Other changes include using Test::More rather than Test....

    You can specify --compat-version=5.x.x but if you want all the old behaviour (including the horrid old directory structure) then you probably need to use an old version of h2xs.

Re: Module Building 5.6 vs 5.8 or 5.10
by polettix (Vicar) on Jun 26, 2008 at 18:38 UTC
    I don't know much about h2xs just because there's Module::Starter (and its companion Module::Starter::PBP). It's meant as a replacement that will give you the possibility of customising many aspects of the newly created modules, e.g. put your name into the right place (instead of A.U.Thor) or your preferred disclaimer text. Higly recommended.

    perl -ple'$_=reverse' <<<ti.xittelop@oivalf

    Io ho capito... ma tu che hai detto?
Re: Module Building 5.6 vs 5.8 or 5.10
by educated_foo (Vicar) on Jun 27, 2008 at 18:43 UTC
    h2xs adds more and more extraneous garbage with each release, so I finally gave up and whipped up my own module creation script. It's only about 120 lines, and only took a little while to write, so I consider it time well spent. If you write more than a few modules, I suggest you do the same.
Re: Module Building 5.6 vs 5.8 or 5.10
by Anonymous Monk on Jun 27, 2008 at 04:40 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (1)
As of 2024-07-21 15:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.