File Coverage

blib/lib/Pipe/Tube/Glob.pm
Criterion Covered Total %
statement 19 19 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 0 2 0.0
total 25 27 92.5


line stmt bran cond sub pod time code
1             package Pipe::Tube::Glob;
2 1     1   6 use strict;
  1         6  
  1         45  
3 1     1   6 use warnings;
  1         1  
  1         72  
4 1     1   40 use 5.006;
  1         3  
  1         57  
5              
6 1     1   6 use base 'Pipe::Tube';
  1         2  
  1         226  
7              
8             our $VERSION = '0.05';
9              
10             sub init {
11 2     2 0 4 my ($self, @patterns) = @_;
12 2         4 @{ $self->{patterns} } = @patterns;
  2         6  
13            
14 2         8 return $self;
15             }
16              
17             sub finish {
18 2     2 0 3 my ($self) = @_;
19              
20 2         3 return glob join " ", @{ $self->{patterns} };
  2         216  
21             }
22              
23             # this module should be rewritten using opendir
24             # the patterns should be either unix wilde cards or Perl regexes (with a flag indicating which one)
25             #
26              
27             1;
28