As AnomalousMonk and LanX already mentioned above, the parameters after the module name (and optional version) in use are just the parameters to the import method from the package being used. That means that you can write use Foo "a", "b", "c";, use Foo qw/a b c/;, or use Foo a=>"b", "c";, and all three cases are exactly equivalent to BEGIN { require Foo; Foo->import("a", "b", "c"); }; the fat comma and qw// work in their usual way. So you see import and thereby use actually has as much flexibility with its arguments as any other Perl sub, including passing references or objects to import.

It is very common for modules to use Exporter, which provides an implementation of import that interprets the parameters as a list of functions to be exported (plus a few other things, such as tags). However, how the import method handles the parameters is totally up to the module, that's why you see it being used for things other than a list of function names sometimes.


In reply to Re: comma(or fat comma) in 'use' directive by Anonymous Monk
in thread comma(or fat comma) in 'use' directive 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.