Actually implement @EXPORT_OK of strptime correctly; delete'ing an undef element...
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>
Wed, 1 Feb 2012 19:06:59 +0000 (19:06 +0000)
committerÆvar Arnfjörð Bjarmason <avar@cpan.org>
Sat, 11 Feb 2012 22:22:25 +0000 (22:22 +0000)
ext/POSIX/lib/POSIX.pm
ext/POSIX/t/export.t

index 98d634d..88f3dde 100644 (file)
@@ -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.
index 07d428e..0753178 100644 (file)
@@ -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);