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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |