| 1 | package CSS::Coverage::Document; | ||||||||||
| 2 | { | ||||||||||
| 3 | 4 | $CSS::Coverage::Document::VERSION = '0.04'; | |||||||||
| 4 | } | ||||||||||
| 5 | 4 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 4 | ▶ | use CSS::Coverage::Deparse; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 4 | has delegate => ( | |||||||||
| 9 | is => 'ro', | ||||||||||
| 10 | does => 'CSS::Coverage::DocumentDelegate', | ||||||||||
| 11 | required => 1, | ||||||||||
| 12 | ); | ||||||||||
| 13 | |||||||||||
| 14 | has deparser => ( | ||||||||||
| 15 | is => 'bare', | ||||||||||
| 16 | isa => 'CSS::Coverage::Deparse', | ||||||||||
| 17 | 7 | ▶ | default => sub { CSS::Coverage::Deparse->new }, | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 18 | 4 | handles => ['stringify_selector'], | |||||||||
| 19 | ); | ||||||||||
| 20 | |||||||||||
| 21 | 7 | ▶ | sub comment { | ||||||||
|
Subroutine
comment: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 22 | 7 | my ($self, $comment) = @_; | |||||||||
| 23 | 7 | ▶ | if ($comment =~ /coverage\s*:\s*(\w+)/i) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | 2 | $self->delegate->_got_coverage_directive($1); | |||||||||
| 25 | } | ||||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | 75 | ▶ | sub end_selector { | ||||||||
|
Subroutine
end_selector: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 29 | 75 | my ($self, $selectors) = @_; | |||||||||
| 30 | |||||||||||
| 31 | 75 | for my $parsed_selector (@$selectors) { | |||||||||
| 32 | 99 | my $selector = $self->stringify_selector($parsed_selector); | |||||||||
| 33 | 99 | $self->delegate->_check_selector($selector); | |||||||||
| 34 | } | ||||||||||
| 35 | } | ||||||||||
| 36 | |||||||||||
| 37 | package CSS::Coverage::DocumentDelegate; | ||||||||||
| 38 | { | ||||||||||
| 39 | 4 | $CSS::Coverage::DocumentDelegate::VERSION = '0.04'; | |||||||||
| 40 | } | ||||||||||
| 41 | 4 | ▶ | use Moose::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 42 | |||||||||||
| 43 | 4 | requires '_check_selector', '_got_coverage_directive'; | |||||||||
| 44 | |||||||||||
| 45 | 4 | 1; | |||||||||
| 46 | |||||||||||
| 47 | __END__ | ||||||||||