File Coverage

blib/lib/Pipe/Tube.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod 0 5 0.0
total 26 31 83.8


line stmt bran cond sub pod time code
1             package Pipe::Tube;
2 1     1   8 use strict;
  1         2  
  1         26  
3 1     1   5 use warnings;
  1         2  
  1         28  
4              
5 1     1   20 use Pipe;
  1         5  
  1         227  
6              
7             our $VERSION = '0.06';
8              
9             sub new {
10 52     52 0 111 my ($class, $pipe, @args) = @_;
11              
12 52         107 my $self = bless {}, $class;
13 52         135 $self->{pipe} = $pipe;
14 52         129 $self->init(@args);
15             }
16              
17             # methods to be implemnetd in subclass:
18             sub init {
19 9     9 0 19 return $_[0];
20             }
21              
22             sub run {
23 2     2 0 5 return;
24             }
25              
26             sub finish {
27 46     46 0 80 return;
28             }
29              
30             sub logger {
31 247     247 0 368 my ($self, $msg) = @_;
32 247         559 Pipe->logger($msg, $self);
33             }
34              
35              
36              
37             1;
38