From: Nicholas Clark Date: Fri, 23 Dec 2005 00:18:27 +0000 (+0000) Subject: De-duplicate the items in @EXPORT. (@EXPORT is built from all the tags, X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=85a5de57f0760868dc6c90e36fe9b7ed954769c0;p=p5sagit%2Fp5-mst-13.2.git De-duplicate the items in @EXPORT. (@EXPORT is built from all the tags, and some constants are mentioned in multiple tags). Should this logic be in Exporter::Heavy? p4raw-id: //depot/perl@26459 --- diff --git a/ext/POSIX/POSIX.pm b/ext/POSIX/POSIX.pm index 079861a..cd6188d 100644 --- a/ext/POSIX/POSIX.pm +++ b/ext/POSIX/POSIX.pm @@ -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(