File Coverage

blib/lib/Pugs/Compiler/Rule.pm
Criterion Covered Total %
statement 17 17 100.0
branch 3 6 50.0
condition 1 3 33.3
subroutine 5 5 100.0
pod 1 1 100.0
total 27 32 84.3


line stmt bran cond sub pod time code
1 10     10   52899 use 5.006001;
  10         41  
  10         451  
2 10     10   63 use strict;
  10         23  
  10         341  
3 10     10   56 use warnings;
  10         20  
  10         608  
4              
5             package Pugs::Compiler::Rule;
6              
7             our $VERSION = '0.37';
8              
9 10     10   58 use base 'Pugs::Compiler::Regex';
  10         20  
  10         4010  
10              
11             sub compile {
12 2     2 1 132 my ( $class, $rule_source, $param ) = @_;
13 2 50       13 $param = ref $param ? { %$param } : {};
14 2 50       15 $param->{ratchet} = 1
15             unless exists $param->{ratchet};
16 2 50 33     21 $param->{sigspace} = 1
17             unless exists $param->{sigspace} ||
18             exists $param->{s};
19 2         29 $class->SUPER::compile( $rule_source, $param );
20             }
21              
22             1;
23             __END__