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