Markdent/Handler/HTMLFilter.pm

filter: Statementstmt 100% 28 / 28 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 1 totaltotal 97.3% 37 / 38 CC 2 SCAR 2.2
CC
2
Cov
100%
filter_event
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Markdent/Handler/Multiplexer.pm ↑ Summary Markdent/CapturedEvents.pm »
1 package Markdent::Handler::HTMLFilter;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 our $VERSION = '0.41';
8  
9 1 ▶use Markdent::CapturedEvents;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 1 with 'Markdent::Role::FilterHandler';
15  
16 14 ▶sub filter_event {
Subroutine filter_event: called CC=2 SCAR=6.9
Pod undocumented
17 14 my $self = shift;
18 14 my $event = shift;
19  
20 return
21 14 ▶ if grep { $event->isa( 'Markdent::Event::' . $_ ) }
Branch: 1 branch
BranchTrueFalseTotal
if grep {$event->isa('Markdent::Event::' . $_);} "HTMLBlock", "HTMLComment", "HTMLCommentBlock", "HTMLTag", "StartHTMLTag", "EndHTMLTag" 4 10 14
22 qw(
23 HTMLBlock
24 HTMLComment
25 HTMLCommentBlock
26 HTMLTag
27 StartHTMLTag
28 EndHTMLTag
29 );
30  
31 10 $self->handler->handle_event($event);
32  
33 10 return;
34 }
35  
36 1 __PACKAGE__->meta->make_immutable;
37  
38 1 1;
39  
40 # ABSTRACT: Filters out HTML events from the event stream
41  
42 __END__
« Markdent/Handler/Multiplexer.pm ↑ Summary Markdent/CapturedEvents.pm »