When a module is use-ed, it can be passed a list of scalar values, strings or numbers, for the module to do with as it pleases (well, as the programmer has defined, hopefully). So in the statement
    use Foo::Bar qw(func1 func2);
the Foo::Bar module is passed the list of strings 'func1' and 'func2'. In the case of
    use Test::Simple tests => 1;
the module Test::Simple is passed the values 'tests' and 1 (although the latter value may be passed as a string; I'm uncertain on this point). The  => (fat comma) simply insures that  tests is interpreted by the compiler as a string when generating the list. (In fact, I think the statement
    use Test::Simple qw(tests 1);
would work just as well, but I have not tested this.)

Update: See Perl Modules in perlmod; also see perlmodlib.


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