summaryrefslogtreecommitdiff
path: root/lib/Exporter.pm
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-10-10 05:10:22 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-10-10 05:10:22 +0000
commit4fddf32b02405fe6f8dbd7b7013cd63eb6be0196 (patch)
tree63fe93db3be9225946f6726f024b8b202796a83d /lib/Exporter.pm
parent882a4479ec0ea121419a518af4f859f20d2c5dd1 (diff)
downloadperl-4fddf32b02405fe6f8dbd7b7013cd63eb6be0196.tar.gz
describe what can go in an export list (from Anno Siegel
<anno4000@lublin.zrz.tu-berlin.de>) p4raw-id: //depot/perl@4331
Diffstat (limited to 'lib/Exporter.pm')
-rw-r--r--lib/Exporter.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Exporter.pm b/lib/Exporter.pm
index d74f07f311..adc843b9f5 100644
--- a/lib/Exporter.pm
+++ b/lib/Exporter.pm
@@ -118,6 +118,18 @@ in L<perlfunc> and L<perlmod>. Understanding the concept of
modules and how the C<use> 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<not> export method names!