This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
shm.t: Don’t call shmctl in END when undefined
authorFather Chrysostomos <sprout@cpan.org>
Wed, 14 Sep 2011 23:12:59 +0000 (16:12 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 15 Sep 2011 01:04:48 +0000 (18:04 -0700)
The skip was not inside a BEGIN block, so the END block ended up
getting compiled and running.

t/io/shm.t

index 46bb2e1..bcd3da5 100644 (file)
@@ -26,11 +26,11 @@ BEGIN {
   if ($ENV{'PERL_CORE'} && $Config{'extensions'} !~ m[\bIPC/SysV\b]) {
     plan(skip_all => 'IPC::SysV was not built');
   }
+  if ($Config{'d_shm'} ne 'define') {
+    plan(skip_all => '$Config{d_shm} undefined');
+  }
 }
 
-if ($Config{'d_shm'} ne 'define') {
-  plan(skip_all => '$Config{d_shm} undefined');
-}
 
 use sigtrap qw/die normal-signals error-signals/;
 use IPC::SysV qw/ IPC_PRIVATE S_IRWXU IPC_RMID /;