http://www.perlmonks.org?node_id=1048482


in reply to Re: Is there a problem with IPC::Open on Windows 7?
in thread Is there a problem with IPC::Open on Windows 7?

It's not broken,

It is broken. It may be "broken by design"; but it is broken.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^3: Is there a problem with IPC::Open on Windows 7?
by ikegami (Patriarch) on Aug 10, 2013 at 19:53 UTC

    The design isn't broken either. It's perfectly simple and makes sense.

    open(\*IN, \*OUT, \*ERR, ...) # Get three pipes back open(\*IN, \*OUT, undef, ...) # Get two pipes back, # one catches both STDOUT and STDERR

    It's using lexicals that causes problems. This module predates lexicals.

      It's using lexicals that causes problems. This module predates lexicals.

      13 years on and it doesn't support lexicals. is 'Broken by Design'.

      And even if you use globs, there is no sensible way to use the 3 handle version on windows because select doesn't work on file handles.

      Even the documentation is sorely lacking.

      At the very least there should be a big, clear warning "Doesn't work with lexicals" in the warnings section. The bland parenthetical "(this means that an autovivified lexical cannot be used for the STDERR filehandle, see SYNOPSIS)" is hardly adequate given the nature of the limitation and the module's raison d'etre.

      The discussion regarding the likelihood of deadlocking when trying to process two concurrent asynchronous streams is also woefully inadequate.

      The modules place in the core and frequent recommendations, bely the difficulty of its practical use; which is further compounded by the lack of discussion of those difficulties, and examples of working around them.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

        Maybe a bug opened to update the documentation would be a good idea? There are couple of workarounds for IPC::Open3, but none seems to be able to reach core.

        Anyway, it seems to be possible to dup() sockets under MS Windows and use select() over them, but as I replied before, I need to do more tests with it.

        Alceu Rodrigues de Freitas Junior
        ---------------------------------
        "You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill