summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/POSIX/lib/POSIX.pm5
-rw-r--r--ext/POSIX/t/export.t4
2 files changed, 6 insertions, 3 deletions
diff --git a/ext/POSIX/lib/POSIX.pm b/ext/POSIX/lib/POSIX.pm
index 98d634d9a0..88f3ddeda1 100644
--- a/ext/POSIX/lib/POSIX.pm
+++ b/ext/POSIX/lib/POSIX.pm
@@ -393,7 +393,10 @@ our %EXPORT_TAGS = (
# Symbols that should not be exported by default because they are recently
# added. It would upset too much of CPAN to export these by default
- delete $export{$_} and push @EXPORT_OK, $_ for qw(strptime);
+ foreach (qw(strptime)) {
+ delete $export{$_};
+ push @EXPORT_OK, $_;
+ }
# Doing the de-dup with a temporary hash has the advantage that the SVs in
# @EXPORT are actually shared hash key scalars, which will save some memory.
diff --git a/ext/POSIX/t/export.t b/ext/POSIX/t/export.t
index 07d428eb1a..0753178f63 100644
--- a/ext/POSIX/t/export.t
+++ b/ext/POSIX/t/export.t
@@ -102,8 +102,8 @@ my %expect = (
getpgrp getppid getpwnam getpwuid gmtime kill lchown link
localtime log mkdir nice open opendir pipe printf rand
read readdir rename rewinddir rmdir sin sleep sprintf sqrt
- srand stat system time times umask unlink utime wait
- waitpid write)],
+ srand stat strptime system time times umask unlink utime
+ wait waitpid write)],
);
plan (tests => 2 * keys %expect);