in reply to Re: Module Creation
in thread Module Creation

This isn't for building modules, this is for building distributables. Building standard modules doesn't need 90% of what h2xs does. (It's all really good stuff, but completely unnecessary.)

Replies are listed 'Best First'.
Re: Re: Re: Module Creation
by TGI (Parson) on Jul 17, 2001 at 22:28 UTC

    Tom Christianson and/or Nathan Torkington seem to think this is a good idea, as they advocate this technique in the Perl Cookbook. I haven't tried it, but it looks like it takes care of a bunch of boring crap automagically (creating directories and a module skeleton along with other stuff). The syntax they recommend is: h2xs -XA -n Foo X suppresses the creation of XS components, the A says that the module won't use the autoloader, and the -n flag marks the name of the module.


    TGI says moo

      My worry is that the "boring crap" very often ends up being either "important crap" or "useless-gets-in-the-way crap". If a module that was solely for internal use and now needs to be distributed in a CPAN-like way, take the time to learn why the MANIFEST (for example) is desirable. The second and subsequent times, use h2xs, by all means.

      I guess I'm old-fashioned. I feel that people should know at least the basics of the tools they're using. *shrugs*

        Good point--makes me think of my calculus teacher that required that we prove that the derivative shortcuts in our text were valid before we could use them. However having a nice clean distro skeleton to look at can be a real asset when your are studying the anatomy of modules.

        My philosophy is to avoid autogenerated code that I don't understand. But I've learned a lot in various enviroments by disecting autogenerated code.


        TGI says moo

Re: Re: Re: Module Creation
by lhoward (Vicar) on Jul 17, 2001 at 22:27 UTC
    It may be unnecessary, but sure is handy to have in case you ever start distributing that module that was "just for internal use"... And it doesn't hurt to have the extra stuff that h2xs adds.