[509] ** beat open3 into submission **

Michael G Schwern schwern at pobox.com
Wed Sep 12 07:21:50 BST 2007


ewilhelm at hexten.net wrote:
>      if ( $class->_use_open3 ) {
> +        # HOTPATCH {{{
> +        my $xclose = \&IPC::Open3::xclose;
> +        'warnings'->can('unimport') and 'warnings'->unimport('redefine');
> +        local *IPC::Open3::xclose = sub {
> +            my $fh = shift;
> +            no strict 'refs';
> +            return if(fileno($fh) == fileno(STDIN));
> +            $xclose->($fh);
> +        };
> +        # }}}
> +

Holy crap, sir!  That's excellent.

Maybe we can consider taking IPC::Open3 onto CPAN?


-- 
There will be snacks.


More information about the tapx-dev mailing list