blib/lib/Pugs/Compiler/Token.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 13 | 13 | 100.0 |
branch | 2 | 4 | 50.0 |
condition | n/a | ||
subroutine | 4 | 4 | 100.0 |
pod | 1 | 1 | 100.0 |
total | 20 | 22 | 90.9 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Pugs::Compiler::Token; | ||||||
2 | |||||||
3 | our $VERSION = '0.28'; | ||||||
4 | |||||||
5 | 5 | 5 | 1459 | use strict; | |||
5 | 12 | ||||||
5 | 217 | ||||||
6 | 5 | 5 | 29 | use warnings; | |||
5 | 12 | ||||||
5 | 173 | ||||||
7 | |||||||
8 | 5 | 5 | 28 | use base 'Pugs::Compiler::Regex'; | |||
5 | 10 | ||||||
5 | 595 | ||||||
9 | |||||||
10 | sub compile { | ||||||
11 | 2 | 2 | 1 | 25 | my ( $class, $rule_source, $param ) = @_; | ||
12 | 2 | 50 | 9 | $param = ref $param ? { %$param } : {}; | |||
13 | 2 | 50 | 14 | $param->{ratchet} = 1 | |||
14 | unless defined $param->{ratchet}; | ||||||
15 | 2 | 25 | $class->SUPER::compile( $rule_source, $param ); | ||||
16 | } | ||||||
17 | |||||||
18 | 1; | ||||||
19 | |||||||
20 | __END__ |