File Coverage

blib/lib/Devel/Declare/Parser/Codeblock.pm
Criterion Covered Total %
statement 18 18 100.0
branch 2 2 100.0
condition 2 3 66.6
subroutine 5 5 100.0
pod 1 1 100.0
total 28 29 96.5


line stmt bran cond sub pod time code
1             package Devel::Declare::Parser::Codeblock;
2 2     2   16744 use strict;
  2         2  
  2         60  
3 2     2   7 use warnings;
  2         2  
  2         40  
4              
5 2     2   5 use base 'Devel::Declare::Parser';
  2         5  
  2         439  
6 2     2   10 use Devel::Declare::Interface;
  2         2  
  2         271  
7             Devel::Declare::Interface::register_parser( 'codeblock' );
8              
9             sub rewrite {
10 6     6 1 10 my $self = shift;
11 4         8 $self->bail(
12             "Syntax error near: " . join( ' and ',
13 2         6 map { $self->format_part($_)}
14 6         14 @{ $self->parts }
15             )
16 6 100 66     14 ) if $self->parts && @{ $self->parts };
17 4         11 1;
18             }
19              
20             1;
21              
22             __END__