It's your module, do what you like! You won't see a lot of code excluding imports. You will see:

use Module qw( :utils ); use Module qw( util1 util2 util5 ); use Module qw( :utils_basic );

You can define any export sets you want. The bottom line is that it will make very little load/runtime diff if you import the extra unused functions.

Personally I generally shun import tags. I like to ask for each and every function by name as when someone else comes to look at the code it documents where the function lives ie which module:

use Module ':all'; use Other ':all'; # etc ..... func(); # "!£$^%^! where the hell did this come from?

I like importing as it save long function names. It does make it harder to track the source module. ':all' or whatever makes it harder still.

cheers

tachyon


In reply to Re: use Module - to exclude or not to exclude... by tachyon
in thread use Module - to exclude or not to exclude... by kiat

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.