X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FExporter.pm;h=585109e7d03c93dc65272ba5034076e21faef5c2;hb=341bd822d2aa170d6da924b2ac1ec314d007122b;hp=d74f07f3119303a4a7938e2b91a8bbf75a7c73e7;hpb=ba5725f86ec53dd2a7f696a72a177a926c615c9e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Exporter.pm b/lib/Exporter.pm index d74f07f..585109e 100644 --- a/lib/Exporter.pm +++ b/lib/Exporter.pm @@ -4,6 +4,7 @@ require 5.001; $ExportLevel = 0; $Verbose ||= 0; +$VERSION = '5.562'; sub export_to_level { require Exporter::Heavy; @@ -118,6 +119,18 @@ in L and L. Understanding the concept of modules and how the C statement operates is important to understanding the Exporter. +=head2 How to Export + +The arrays C<@EXPORT> and C<@EXPORT_OK> in a module hold lists of +symbols that are going to be exported into the users name space by +default, or which they can request to be exported, respectively. The +symbols can represent functions, scalars, arrays, hashes, or typeglobs. +The symbols must be given by full name with the exception that the +ampersand in front of a function is optional, e.g. + + @EXPORT = qw(afunc $scalar @array); # afunc is a function + @EXPORT_OK = qw(&bfunc %hash *typeglob); # explicit prefix on &bfunc + =head2 Selecting What To Export Do B export method names!