- no warnings 'redefine';
- *WIFEXITED = sub { 1 } unless eval { WIFEXITED(0); 1 };
- *WEXITSTATUS = sub { shift() >> 8 } unless eval { WEXITSTATUS(0); 1 };
- *WIFSIGNALED = sub { shift() & 127 } unless eval { WIFSIGNALED(0); 1 };
+ $WIFEXITED = eval { POSIX::WIFEXITED(0); 1 } ? \&POSIX::WIFEXITED
+ : sub { 1 };
+ $WEXITSTATUS = eval { POSIX::WEXITSTATUS(0); 1 } ? \&POSIX::WEXITSTATUS
+ : sub { shift() >> 8 };
+ $WIFSIGNALED = eval { POSIX::WIFSIGNALED(0); 1 } ? \&POSIX::WIFSIGNALED
+ : sub { shift() & 127 };
+ $WTERMSIG = eval { POSIX::WTERMSIG(0); 1 } ? \&POSIX::WTERMSIG
+ : sub { shift() & 127 };