http://www.perlmonks.org?node_id=1008349

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

I may be just showing signs of early alzheimer's but I thought I could accomplish something with the h2xs command and find I can't.

Maybe I just dreamed it but here is what I thought I remembered: if I run h2xs once such that:

$ h2xs -AXn Foo
it would create a directory with all the Foo module stuff in it in a CPAN compatible manner. Here's where my memory fails me. I thought that if I followed up with:
$ h2xs -AXn Foo::Bar $ h2xs -AXn Foo::Baz $ h2xs -AXn Foo::Bar::Blaht
that there was a way to cooerce h2xs to put all of them in the same directory tree and update stuff along the way.

Did that work once upon a time or did I dream it?


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

Replies are listed 'Best First'.
Re: using h2xs to create hierarchical modules
by Anonymous Monk on Dec 11, 2012 at 17:54 UTC

    no bueno :) IIRC untested  h2xs -AXn Foo::Bar -n Foo::Baz -n Foo::Bar::Blaht

    OTOH :)

    module-starter --author author --email email --module Foo::Bar --module Foo::Baz --module Foo::Bar::Blaht

    foo-bar |-- Changes |-- MANIFEST |-- Makefile.PL |-- README |-- ignore.txt |-- lib | `-- Foo | |-- Bar | | `-- Blaht.pm | |-- Bar.pm | `-- Baz.pm `-- t |-- 00-load.t |-- boilerplate.t |-- manifest.t |-- pod-coverage.t `-- pod.t 4 directories, 13 files

      Tried it... Like it. I've also been using the Module::Starter::AddModule plug in to add the modules I forgot. :-)


      Peter L. Berghold -- Unix Professional
      Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
        You may also want to look at Dist::Zilla, the heir to Module::Starter.

        xoxo,
        Andy