File Coverage

blib/lib/TAP/Spec/Footer.pm
Criterion Covered Total %
statement 10 22 45.4
branch 0 6 0.0
condition n/a
subroutine 4 5 80.0
pod 1 1 100.0
total 15 34 44.1


line stmt bran cond sub pod time code
1             package TAP::Spec::Footer;
2             BEGIN {
3 2     2   116 $TAP::Spec::Footer::AUTHORITY = 'cpan:ARODLAND';
4             }
5             {
6             $TAP::Spec::Footer::VERSION = '0.10';
7             }
8             # ABSTRACT: Trailing information in a TAP stream
9 2     2   12 use Mouse;
  2         4  
  2         19  
10 2     2   832 use namespace::autoclean;
  2         4  
  2         24  
11              
12 2     2   167 use TAP::Spec::Comment ();
  2         7  
  2         578  
13              
14              
15             has 'comments' => (
16             is => 'rw',
17             isa => 'ArrayRef',
18             predicate => 'has_comments',
19             );
20              
21              
22              
23             has 'leading_junk' => (
24             is => 'rw',
25             isa => 'ArrayRef',
26             predicate => 'has_leading_junk',
27             );
28              
29              
30             has 'trailing_junk' => (
31             is => 'rw',
32             isa => 'ArrayRef',
33             predicate => 'has_trailing_junk',
34             );
35              
36             sub as_tap {
37 0     0 1   my ($self) = @_;
38              
39 0           my $tap = "";
40              
41 0 0         if ($self->has_leading_junk) {
42 0           $tap .= $_->as_tap for @{ $self->leading_junk };
  0            
43             }
44              
45 0 0         if ($self->has_comments) {
46 0           $tap .= $_->as_tap for @{ $self->comments };
  0            
47             }
48              
49 0 0         if ($self->has_trailing_junk) {
50 0           $tap .= $_->as_tap for @{ $self->trailing_junk };
  0            
51             }
52              
53 0           return $tap;
54             }
55              
56             __PACKAGE__->meta->make_immutable;
57              
58             __END__