So, which modules are included in your "cross-compile bundle"? (Hint, it will be documented in one of the build scripts.) Once you have that list of all the modules, determine which modules your code uses (Hint: you use modules) and cross them off the list. Look at each of these modules, determine their pre/co requisits and cross them off as well. Repeat this process. The remaining items on the list after all of the direct-, pre-, and co-requisites are subracted are candidates for removal.

Start removing them, one at a time, and verify between each removal that the code still works properly (Hint: use your extensive test suit). If the code still works, congratualations, you have found a 'unnecessary' module. Repeat process for the rest of your list.

Or, you could just buy a better hard-drive....

Note: the 'unecessary modules' list you build here is good only for this particular version of your Code. The first time you try to add a feature, you may well discover that you need to add another module.

You are creating a maintenance nightmare as a trade for a few megabytes of storage. In the age of multi-TByte disks and laptops with 500G of main memory, you are being "penny-wise and pound-foolish".

Update: Corrected typo (Thanks MidLifeXis)

----
I Go Back to Sleep, Now.

OGB


In reply to Re: disabling unnecessary perl modules by Old_Gray_Bear
in thread disabling unnecessary perl modules by samithawijedasa

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.