Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: What is the preferred cross-platform IPC module?

by Theory (Beadle)
on May 15, 2012 at 15:31 UTC ( [id://970662]=note: print w/replies, xml ) Need Help??


in reply to Re: What is the preferred cross-platform IPC module?
in thread What is the preferred cross-platform IPC module?

turns out that, for my needs, I need to be able to write to the target's STDIN and read from its STDOUT. I started implementing the module I have been imagining, but it looks like I really should read the IPC::Run docs more closely before I go any further with it. Although its docs say that Win32 support is experimental…
  • Comment on Re^2: What is the preferred cross-platform IPC module?

Replies are listed 'Best First'.
Re^3: What is the preferred cross-platform IPC module?
by BrowserUk (Patriarch) on May 15, 2012 at 15:59 UTC

    Take a look at winopen2() in Win32::SocketPair.


    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.

    The start of some sanity?

      I don't have Windows, and besides, that would completely defeat the purpose: I don't want to have to think about platform issues or any error-handling beyond trapping exceptions. I want a module that does all that for me. I like IPC::System::Simple, for example, which appears to do a nice job of it if all I want to do is system or backticks. IPC::Run may or may not succeed in doing it for interactive IPC, I'm still trying to figure that out.

        Sorry, for trying to help.

        My experiences of using IPC::Run on windows are dire. It is an over-engineered behemoth of a module that attempts to use *nix techniques to provide *nix capabilities on Windows, and fails dismally.

        The point about winopen2 is that it provides you with a pair of selectable handles connected to the child process' STDIN & STDOUT.

        As such, it is 'compatibile' with *nix-style code written using IPC::Open2 and select.

        Ie. you'd only need do something like:

        my( $in, $out ); if( $^O eq 'MSWin32' ) { ($in, $out ) = winopen2( $theCommand ); } else { open2( $in, $out, $theCommand ); } ... select .....

        But, its not in a module so ...


        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.

        The start of some sanity?

        It seems to me that your response of

        besides, that would completely defeat the purpose: I don't want to have to think about platform issues

        conflicts with

        I started implementing the module I have been imagining,

        that was stated in the node that was being responded to.

        At least, I expect that creating a module that saves users from having to deal with "platform issues" that they would otherwise have to deal with pretty much requires that the author "think about [those] platform issues".

        - tye        

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://970662]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2024-04-23 12:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found