I didn't know much about scripting with Perl until pretty recently. I knew how to throw a Perl script into ~/bin to create commands and that was about the extent of my knowledge.

Over the past year or so, I have become much more familiar with creating, installing and running command-line scripts with Perl. But I still don't have much experience to know which method I should settle on. When is it appropriate to just throw something in ~/bin? When should I prefer a modulino? When should I create a module for my command? Do I ever need to create a module if I'm just going to use the command myself? If I do create a module, which approach should I use? App:Cmd? How about MooseX::App::Cmd? What other cool approaches are there to create new command line initiated scripts? And generally speaking, what are the best, most efficient practices for creating a cool library of perl commands to help you get work done faster? I'd be very interested in hearing what others are doing in this area. Thanks!

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks


In reply to TIMTOWTDI but how do you use Perl to create CLI scripts? by nysus

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.