Q1) How do I create and roll out a Carton of these? (I have another machine with a new ubuntu install to test on.) Is a Carton the right tool?

If all you care about is getting the latest version of the modules, then you don't need Carton, only App::cpanminus (cpanm), because once you have a cpanfile, the command cpanm --installdeps . will install everything listed in that file. Carton is useful if you want to install specific versions of modules, to exactly replicate a module setup on a different machine. See Carton::Doc::FAQ.

Q2) How do I know whether I have all the core modules? How do I not leave it to chance?

Debian should install its perl package by default, which includes its perl-modules package. If for some reason it doesn't get installed, you can always sudo apt-get install perl. If you're building a fresh perl with e.g. perlbrew, you should be getting all core modules by default as well.

Q3) How do I take this output and instruct another machine to install this?

That particular output is suited for a Makefile.PL format. You could of course write a quick&dirty oneliner to turn it into cpanfile format:

$ scandeps.pl -R script.pl | perl -ne \ 'printf qq{requires "%s", "%s";\n}, eval'
Q4) What perl aliases do you use? What aliases in general?

The only one I personally have is alias prl='perl -wMstrict -MData::Dump', the rest I do by hand. I also have a ~/.perltidyrc and ~/.perlcriticrc.

Update: Shortened oneliner.


In reply to Re: Using Cartons to automate module installs by haukex
in thread Using Cartons to automate module installs by Aldebaran

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.