script/alvis-pipeline-get.pl untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 3 Podpod n/a totaltotal 0.0% 0 / 32 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/local/bin/perl -w
2  
3 # $Id: alvis-pipeline-get.pl,v 1.4 2005/09/30 16:20:28 mike Exp $
4  
5 use strict;
6 use warnings;
7 use Alvis::Pipeline;
8  
9 die "Usage: $0 <port> <spooldir>" if @ARGV != 2;
10 my($port, $spooldir) = @ARGV;
11 my $pipe = new Alvis::Pipeline::Read(port => $port, spooldir => $spooldir)
12 or die "can't create read-pipe on port $port: $!";
13  
14 my $n = 0;
15 while (my $xml = $pipe->read(1)) {
16 $xml .= "\n" if $xml !~ /\n$/;
17 print "=== new document ===\n$xml";
18 $n++;
19 }
20  
21 $pipe->close();
22 print "No documents in pipeline\n"
23 if $n == 0;