Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

How to support Windows compatibility

by hepcat72 (Sexton)
on Apr 02, 2014 at 13:50 UTC ( [id://1080776]=perlquestion: print w/replies, xml ) Need Help??

hepcat72 has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I have an old module on cpan (my first/only one) that I wrote called IO::Pipe::Producer which basically has 2 functions. It can take a reference to a subroutine or a command for a system call, forks a child which runs it, and returns 2 file handles for the standard out and standard in that can be read from by the parent.

I had forgotten that I'd gone through the "rigor" of creating a package with MakeMaker (I originally used Build), so I was pleasantly surprised that I could install it on my new computer so easily. I started perusing the module and noted a bug report about a hang on Windows when it tried to run the tests. I know virtually zero about Windows and I don't have access to a Windows machine to test it on. Can anyone give me a hint as to why it doesn't work on Windows?

I'd like my current project for which I want to use the module to be able to work on a Windows box if possible.

Thanks,
Rob

Replies are listed 'Best First'.
Re: How to support Windows compatibility
by BrowserUk (Patriarch) on Apr 02, 2014 at 14:30 UTC
    Can anyone give me a hint as to why it doesn't work on Windows?

    Pipes are files handles and select doesn't work for filehandles on Windows.

    See Win32::SocketPair winopen2() and winopen2_5() for a workaround that redirects the output via sockets in order to alleviate the restriction.


    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.
Re: How to support Windows compatibility
by Bloodnok (Vicar) on Apr 02, 2014 at 14:40 UTC
    Whilst not wanting, in any way to tread on toes, I would suggest that, if you intend to develop &/or on Windoze, you get copies of Win32 Perl Scripting &/or Win32 Perl Programming Standard Extensions - they worked wonders for me whilst I was encumbered with M$.

    A user level that continues to overstate my experience :-))

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-03-28 16:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found