Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Here are some additional thoughts/steps.

  • h2xs automatically creates a MANIFEST file. I don't use it; I delete it. I like using 'make manifest', because it automatically generates a MANIFEST file for me when I want it. To do this, set up a MANIFEST.SKIP file. Here's an example of a standard one I use:
    \bCVS\b ^MANIFEST\. ^Makefile$ ~$ \.old$ ^blib/ ^pm_to_blib$ \.tar\.gz$
    With this in place, I don't have to maintain a list of all my files; 'make manifest' will start at the current directory and assemble a list of all files not matching the patterns in MANIFEST.SKIP, then write the names of those files to MANIFEST.

    So, to create a new distribution, I can do:

    perl Makefile.PL make manifest make dist
    I keep my MANIFEST.SKIP under source control but that's not really necessary.

  • What is 'make build'? My Makefiles don't have a 'build' target.

  • You might also want to get into some of the interesting things you can do with a Makefile.PL. You can make it sort of a 'configure' for your distribution.

    As an example, the Makefile.PL for Net::SSH::Perl lets the user choose whether to install the prereqs for SSH-1 or SSH-2 (or both), which means that if the user really only wants SSH-1 support, he/she doesn't have to install a bunch of modules he/she doesn't need. Of course, this also means you have to learn to love using require in your code, for runtime loading of modules. :)

    Another useful Makefile.PL "trick" is to a "does user have this module installed?" function:

    sub have_mod { my($mod, $ver) = @_; eval("use $mod" . ($ver ? " $ver;" : ";")); !$@; }
    This allows you to do your own prerequisite checking in Makefile.PL, because unfortunately, the prereq checking in the CPAN module depends on having an explicit list of args to PREREQ_PM; it actually parses your Makefile.PL to look for such a list. If you have, for example, this:
    PREREQ_PM => \%prereq,
    then it won't pick up the list of prereqs correctly. So if that list is dynamic, then you may need to do your own checking.

In reply to Re: Starting the development of a module : thoughts by btrott
in thread Starting the development of a module : thoughts by Masem

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others perusing the Monastery: (8)
    As of 2014-09-20 11:20 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (158 votes), past polls