IPC::Open3::xclose hotpatch

Eric Wilhelm scratchcomputing at gmail.com
Thu May 15 20:25:30 UTC 2008


# from Andy Armstrong
# on Thursday 15 May 2008:

> The code looks like this:
>
>         # HOTPATCH {{{
>         my $xclose = \&IPC::Open3::xclose;
>         local $^W;    # no warnings
>         local *IPC::Open3::xclose = sub {

Indeed.  That could perhaps stand to have more comment, and is in fact a 
monkeypatch, but I did it that way to be compatible with old versions 
of IPC::Open3.  IIRC, the desired behavior is to have the test process 
STDIN remain attached.

As you noticed, the local() applies to the forked process.

--Eric
-- 
Turns out the optimal technique is to put it in reverse and gun it.
--Steven Squyres (on challenges in interplanetary robot navigation)
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------


More information about the tapx-dev mailing list