Well, loading POSIX which is an XS/C module is afaik pretty light. You could always put something like

END { use Data::Dumper; print Dumper(\%INC); }

in one of your modules and have a look at what is loaded. Id guess you'd be surprised. :-)

Is it not using posix only for this that would make the code as a whole bloated ? .

How does

use POSIX qw(strftime); print strftime "%Y-%m-%d",localtime(time);

Make your code bloated? Id bet the optrees and the rest created by your code to do the same thing are actually a lot bigger footprint than the precompiled from C POSIX library. Also, of the two which would you prefer to maintain?

Now look, if you are writing scripts for a high usage web set, or something that has to have really fast load times then fine we can quibble about loading POSIX or something like it. But for the rest of the time I dont really see much room for even thinking about how long modules load, almost any task that is hard to do will take so much longer than the load time that its not worth caring.

---
demerphq


In reply to Re^7: Directory creation with current Date by demerphq
in thread Directory creation with current Date by samv74

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.