Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the IPC-System-Simple CPAN distribution.

Report information
The Basics
Id: 52366
Status: resolved
Priority: 0/
Queue: IPC-System-Simple

People
Owner: Nobody in particular
Requestors: murphy [...] genome.chop.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Subroutine IPC::System::Simple::WIFEXITED redefined perplexingly
Using Version 5.10.1.0, released 21 Oct 2009. How to reproduce: perl -MIPC::System::Simple -e 1 Result: Subroutine IPC::System::Simple::WIFEXITED redefined at C:\strawberry\perl\vendor\lib/IPC/System/Simple.pm line 109. Subroutine IPC::System::Simple::WEXITSTATUS redefined at C:\strawberry\perl\vendor\lib/IPC/System/Simple.pm line 110. Subroutine IPC::System::Simple::WIFSIGNALED redefined at C:\strawberry\perl\vendor\lib/IPC/System/Simple.pm line 111. Subroutine IPC::System::Simple::WTERMSIG redefined at C:\strawberry\perl\vendor\lib/IPC/System/Simple.pm line 112.
This isn't a Strawberry bug, this is a module bug. Attempting to redirect to the appropriate queue.
PJF: Suggestion to fix this may be to delay the import. Could you try this to fix it? use POSIX qw(); ... # Not all systems implment the WIFEXITED calls, but POSIX # will always export them (even if they're just stubs that # die with an error). Test for the presence of a working # WIFEXITED and friends, or define our own. eval { POSIX::WIFEXITED(0); }; if ($@ =~ UNDEFINED_POSIX_RE) { *WIFEXITED = sub { not $_[0] & 0xff }; *WEXITSTATUS = sub { $_[0] >> 8 }; *WIFSIGNALED = sub { $_[0] & 127 }; *WTERMSIG = sub { $_[0] & 127 }; } elsif ( defined $@) { croak sprintf FAIL_POSIX, $@; } else { POSIX->import(qw(WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG)); } The other possibility - if that doesn't work - is to "no warnings" the appropriate code.
On Wed Dec 02 13:06:39 2009, CSJEWELL wrote: Show quoted text
> Suggestion to fix this may be to delay the import. Could you try this to > fix it?
It worked; thanks. I am about to distribute an app that will rely on IPC::System::Simple, so it would be good if Windows users didn't experience the warnings. BTW, I had tried 'no warnings/use warnings' around the 'use IPC::System::Simple', but that didn't work. I subsequently discovered that the warnings pragma has lexical scope. I guess I could use $^W .... Sorry about not noticing the wrong queue. I meant to put it in the module's queue ....
On Wed Dec 02 13:06:39 2009, CSJEWELL wrote: Show quoted text
> PJF: > > Suggestion to fix this may be to delay the import. Could you try this to > fix it? > > use POSIX qw();
Yikes! Thanks for the bump; this had entirely skipped my mind with all my recent travel, and a change in operating systems on my laptop. I've put this on my TODO list for today, and will hopefully have a new release out on the CPAN within 24 hrs. Many thanks! Paul
I've pushed IPC::System::Simple 1.19 to the CPAN which should fix this issue. Unfortunately for me, I don't have a Windows box handy with which to test it, and since I'm in a car headed for the beach, that's not going to change in the next day or two. ;) Many thanks, and all the best, Paul