-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathPipelessCommand.pm
59 lines (43 loc) · 1.18 KB
/
PipelessCommand.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#
# Copyright (c) 2015 Christian Jaeger, [email protected]
#
# This is free software, offered under either the same terms as perl 5
# or the terms of the Artistic License version 2 or the terms of the
# MIT License (Expat version). See the file COPYING.md that came
# bundled with this file.
#
=head1 NAME
Chj::IO::PipelessCommand
=head1 SYNOPSIS
use Chj::IO::PipelessCommand;
use Chj::xopen qw(xopen_read);
use Chj::xtmpfile;
my $in = xopen_read $inpath;
my $out = xtmpfile $outpath;
my $c = Chj::IO::PipelessCommand
->new_with_in_out ($in,$out, $path, @args);
# $c can't be read from or written to.
$c->xxfinish;
=head1 DESCRIPTION
=head1 NOTE
This is alpha software! Read the status section in the package README
or on the L<website|http://functional-perl.org/>.
=cut
package Chj::IO::PipelessCommand;
use strict;
use warnings;
use warnings FATAL => 'uninitialized';
use base qw(
Chj::IO::CommandCommon
);
sub new_with_in_out {
my $class = shift;
my $infh = shift;
my $outfh = shift;
my $self = bless {}, $class;
$self->xlaunch3($infh, $outfh, undef, @_);
}
# override as NOOPs
sub close { }
sub xclose { }
1