App-optex
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/App/optex/util/filter.pm view on Meta::CPAN
=over 4
=cut
######################################################################
######################################################################
sub io_filter (&@) {
my $sub = shift;
my %opt = @_;
local @ARGV;
if ($opt{PREFORK}) {
my $stdin = $sub->();
$sub = sub { print $stdin };
$opt{STDIN} = 1;
}
my $pid = do {
if ($opt{STDIN}) { open STDIN, '-|' }
elsif ($opt{STDOUT}) { open STDOUT, '|-' }
elsif ($opt{STDERR}) { open STDERR, '|-' }
else { croak "Missing option" }
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.548 second using v1.00-cache-2.02-grep-82fe00e-cpan-da92000dfeb )