Exports trim into caller's namespace. This is even more evil than usual because trim is such a favourite subroutine name among programmers. In other words, it is highly likely that use-ing String::Iota unexpectedly overwrites an existing subroutine.
Of course not. First of all, it's highly unlikely String::Iota is going to widely used. Second, if there's a potential clash, or if people want to avoid a potential clash, people will explicitly import. And once people explicitly import, it doesn't make one iota difference whether the default export set of a module is empty or not. All an empty @EXPORT does is setting up an annoying default (people tend to use (non-OO) modules to its subroutines - therefore, exporting all or a subset of the modules by default makes good sense in many cases). Note also that if you want to use a module, but not want to import any of its symbols, all the caller needs to do is typing two extra characters. Third, so what if there's a clash? It's not that Perl doesn't give a warning the first time you compile the program (and you do have warnings turned on, don't you?). Fourth, if you're going to use a module X which exports routines Y and Z, would you name your own functions Y or Z? Nope, you'd pick something else. People don't just use modules willy-nilly and start reading what it does afterwards.

In reply to Re: deconstructing String::Iota - not worth one iota by JavaFan
in thread deconstructing String::Iota - not worth one iota by Anonymous Monk

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.