I want to have the tool scan the source code for “uses” and “require” statements, and generate a nice package that will automatically retrieve from CPAN and install the packages that this app needs. “DWIM,” y’know...

I would recommend against that, though it would be nice. It is not self-documenting. Too much voodoo.

Module::Install is really very nice and self-bundling. I.e., MI does not have to be installed on the target machine. It's good at pulling in CPAN deps and such when you run its Makefile.PL. And that is where the real task is. The Perl makefile is just a script. They come with lots of features from the various installers but they're still just scripts. I did one recently that fetched zipped dists of thirdparty JS stuff and installed it automatically when the makefile was run. That way no external libs are in the source control; only in the dist. Again, kudos to adamk is due. He maintains the archive zip stuff too, I think.

The other good thing about makefiles is they document their requirements both for man and machine. If you do end up writing a scanning script, have it write your makefile requires statements for you. Best of both. Share it if you do!

Oh, congratulations, too! Feels great to get a project done well.


In reply to Re: Making a distribution for my website by Your Mother
in thread Making a distribution for my website by locked_user sundialsvc4

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.