This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
De-duplicate the items in @EXPORT. (@EXPORT is built from all the tags,
authorNicholas Clark <nick@ccl4.org>
Fri, 23 Dec 2005 00:18:27 +0000 (00:18 +0000)
committerNicholas Clark <nick@ccl4.org>
Fri, 23 Dec 2005 00:18:27 +0000 (00:18 +0000)
and some constants are mentioned in multiple tags).
Should this logic be in Exporter::Heavy?

p4raw-id: //depot/perl@26459

ext/POSIX/POSIX.pm

index 079861a..cd6188d 100644 (file)
@@ -2,7 +2,7 @@ package POSIX;
 
 our(@ISA, %EXPORT_TAGS, @EXPORT_OK, $AUTOLOAD, %SIGRT) = ();
 
-our $VERSION = "1.09";
+our $VERSION = "1.10";
 
 use AutoLoader;
 
@@ -958,8 +958,12 @@ sub load_imports {
 );
 
 # Exporter::export_tags();
-for (values %EXPORT_TAGS) {
-  push @EXPORT, @$_;
+{
+  # De-duplicate the export list: 
+  my %seen;
+  for (values %EXPORT_TAGS) {
+    push @EXPORT, grep {!$seen{$_}++} @$_;
+  }
 }
 
 @EXPORT_OK = qw(