summaryrefslogtreecommitdiff
path: root/lib/Exporter.pm
diff options
context:
space:
mode:
authorAndy Dougherty <doughera@lafcol.lafayette.edu>1995-05-30 01:56:48 +0000
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1995-05-30 01:56:48 +0000
commitf06db76b9e41859439aeadb79feb6c603ee741ff (patch)
tree0898eb19feb17c3aa0ff6916fc182a998f1b9949 /lib/Exporter.pm
parentd1b918924020f633640d8b8cc8294856a82ddc04 (diff)
downloadperl-f06db76b9e41859439aeadb79feb6c603ee741ff.tar.gz
This is my patch patch.1g for perl5.001.
This patch only includes updates to the lib/ directory and the removal of the pod/modpods. The main things are the following: The modpods are now embedded in their corresponding .pm files. The Grand AutoLoader patch. Updates to lib/ExtUtils/xsubpp by Paul Marquess <pmarquess@bfsec.bt.co.uk>. Minor changes to a very few modules and pods. To apply, change to your perl directory, run the commands above, then apply with patch -p1 -N < thispatch. After you apply this patch, you should go on to apply patch.1h and patch.1i before reConfiguring and building. Patch and enjoy, Andy Dougherty doughera@lafcol.lafayette.edu Dept. of Physics Lafayette College, Easton PA Here's the file-by-file description: lib/AnyDBM_File.pm Embedded pod. lib/AutoLoader.pm Grand AutoLoader patch. Embedded pod. lib/AutoSplit.pm Grand AutoLoader patch. Embedded pod. Skip pod sections when splitting .pm files. lib/Benchmark.pm lib/Carp.pm lib/Cwd.pm lib/English.pm Grand AutoLoader patch. Embedded pod. lib/Exporter.pm Grand AutoLoader patch. Embedded pod. Update comments to match behavior. lib/ExtUtils/MakeMaker.pm Include installation of .pod and .pm files. Space out documentation for better printing with pod2man. lib/ExtUtils/xsubpp Patches from Paul Marquess <pmarquess@bfsec.bt.co.uk>, 22 May 1995. Now at version 1.4. lib/File/Basename.pm Embedded pod. lib/File/CheckTree.pm Embedded pod. lib/File/Find.pm Embedded pod. Included finddepth pod too. lib/FileHandle.pm Embedded pod. lib/Getopt/Long.pm Embedded pod. Fixed PERMUTE order bug. lib/Getopt/Std.pm Embedded pod. Caught accessing undefined element off end of @arg array. lib/I18N/Collate.pm lib/IPC/Open2.pm lib/IPC/Open3.pm lib/Net/Ping.pm Embedded pod. lib/Term/Complete.pm Embedded pod. Changed name from complete to Complete to match documentation and exported name. lib/Text/Abbrev.pm Embedded pod. lib/Text/Tabs.pm Updated. lib/integer.pm lib/less.pm lib/sigtrap.pm lib/strict.pm lib/subs.pm Embedded pod.
Diffstat (limited to 'lib/Exporter.pm')
-rw-r--r--lib/Exporter.pm29
1 files changed, 19 insertions, 10 deletions
diff --git a/lib/Exporter.pm b/lib/Exporter.pm
index add5657fac..ca1ff3547c 100644
--- a/lib/Exporter.pm
+++ b/lib/Exporter.pm
@@ -2,31 +2,40 @@ package Exporter;
=head1 Comments
-If the first entry in an import list begins with /, ! or : then
-treat the list as a series of specifications which either add to
-or delete from the list of names to import. They are processed
-left to right. Specifications are in the form:
+If the first entry in an import list begins with !, : or / then the
+list is treated as a series of specifications which either add to or
+delete from the list of names to import. They are processed left to
+right. Specifications are in the form:
- [!]/pattern/ All names in @EXPORT and @EXPORT_OK which match
[!]name This name only
- [!]:tag All names in $EXPORT_TAGS{":tag"}
[!]:DEFAULT All names in @EXPORT
+ [!]:tag All names in $EXPORT_TAGS{tag} anonymous list
+ [!]/pattern/ All names in @EXPORT and @EXPORT_OK which match
-e.g., Foo.pm defines:
+A leading ! indicates that matching names should be deleted from the
+list of names to import. If the first specification is a deletion it
+is treated as though preceded by :DEFAULT. If you just want to import
+extra names in addition to the default set you will still need to
+include :DEFAULT explicitly.
+
+e.g., Module.pm defines:
@EXPORT = qw(A1 A2 A3 A4 A5);
@EXPORT_OK = qw(B1 B2 B3 B4 B5);
- %EXPORT_TAGS = (':T1' => [qw(A1 A2 B1 B2)], ':T2' => [qw(A1 A2 B3 B4)]);
+ %EXPORT_TAGS = (T1 => [qw(A1 A2 B1 B2)], T2 => [qw(A1 A2 B3 B4)]);
Note that you cannot use tags in @EXPORT or @EXPORT_OK.
Names in EXPORT_TAGS must also appear in @EXPORT or @EXPORT_OK.
Application says:
- use Module qw(:T2 !B3 A3);
+ use Module qw(:DEFAULT :T2 !B3 A3);
use Socket qw(!/^[AP]F_/ !SOMAXCONN !SOL_SOCKET);
use POSIX qw(/^S_/ acos asin atan /^E/ !/^EXIT/);
+You can set C<$Exporter::Verbose=1;> to see how the specifications are
+being processed and what is actually being imported into modules.
+
=cut
require 5.001;
@@ -110,7 +119,7 @@ sub export {
}
}
}
- die "Can't continue with import errors.\n" if $oops;
+ Carp::croak("Can't continue with import errors.\n") if $oops;
}
else {
@imports = @exports;