blib/lib/Pegex/Crontab/AST.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 16 | 16 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 6 | 6 | 100.0 |
pod | 0 | 4 | 0.0 |
total | 22 | 26 | 84.6 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Pegex::Crontab::AST; | ||||||
2 | 2 | 2 | 12 | use Pegex::Base; | |||
2 | 4 | ||||||
2 | 14 | ||||||
3 | extends 'Pegex::Tree'; | ||||||
4 | |||||||
5 | 2 | 2 | 9600 | use lexicals; | |||
2 | 6270 | ||||||
2 | 520 | ||||||
6 | |||||||
7 | sub cron_hash { | ||||||
8 | 4 | 4 | 0 | 4 | my ($min, $hour, $dom, $mon, $dow, $cmd) = @{(shift)}; | ||
4 | 10 | ||||||
9 | 4 | 13 | lexicals; | ||||
10 | } | ||||||
11 | |||||||
12 | sub env_hash { | ||||||
13 | 2 | 2 | 0 | 3 | my ($var, $val) = @{(shift)}; | ||
2 | 5 | ||||||
14 | 2 | 7 | lexicals; | ||||
15 | } | ||||||
16 | |||||||
17 | sub got_cron_line { | ||||||
18 | 4 | 4 | 0 | 4513 | my ($self, $node) = @_; | ||
19 | 4 | 11 | cron_hash($node); | ||||
20 | } | ||||||
21 | |||||||
22 | sub got_env_line { | ||||||
23 | 2 | 2 | 0 | 3281 | my ($self, $node) = @_; | ||
24 | 2 | 25 | env_hash($node); | ||||
25 | } | ||||||
26 | |||||||
27 | 1; |