WWW/HTMLTagAttributeCounter.pm

filter: Statementstmt 62.9% 17 / 27 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 55.5% 5 / 9 Podpod 100% 1 / 1 totaltotal 52.2% 23 / 44 CC 4 SCAR 15.6
CC
4
Cov
52%
_process_request
12.0
_prepare_wheel
6.0
_methods_define
2.0
CRAP 4.8
« WWW/DoctypeGrabber.pm ↑ Summary WWW/Lipsum.pm »
1 package POE::Component::WWW::HTMLTagAttributeCounter;
2  
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $VERSION = '2.001002'; # VERSION
7  
8 2 ▶use POE;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use base 'POE::Component::NonBlockingWrapper::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
10 2 ▶use WWW::HTMLTagAttributeCounter;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 0 ▶sub _methods_define {
Subroutine _methods_define: not called CC=1 SCAR=6.9
13 0 return ( count => '_wheel_entry' );
14 }
15  
16 0 ▶sub count {
Subroutine count: not called CC=1 SCAR=6.9
Pod documented
17 0 $poe_kernel->post( shift->{session_id} => count => @_ );
18 }
19  
20 0 ▶sub _prepare_wheel {
Subroutine _prepare_wheel: not called CC=2 SCAR=17.9
21 0 my $self = shift;
22 $self->{obj} = WWW::HTMLTagAttributeCounter->new(
23 $self->{ua} ? $self->{ua} : ()
24 0 ▶ );
Branch: 1 branch
BranchTrueFalseTotal
$self->{'ua'} ? : 0 0 0
25 }
26  
27 0 ▶sub _process_request {
Subroutine _process_request: not called CC=3 SCAR=24.8
28 0 my ( $self, $in_ref ) = @_;
29  
30 0 ▶ $in_ref->{type} ||= 'tag';
Condition0%0/2
$in_ref->{"type"} ||= "tag"
l!l
00
MC/DC0%0/1
$in_ref->{"type"} ||= "tag"
$in_ref->{"type"}
Truth table0%0/2
A
A= $in_ref->{"type"}
Aresult
11
00
31 0 my $c = $self->{obj};
32 0 ▶ if ( my $result = $c->count( @$in_ref{qw/where what type/} ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $result = $c->count(@$in_ref{'where', 'what', 'type'})) { } 0 0 0
33 0 @$in_ref{ qw/result result_readable/ } = ( $result, "$c" );
34 }
35 else {
36 0 $in_ref->{error} = $c->error;
37 }
38  
39 }
40  
41 2 1;
42 __END__
« WWW/DoctypeGrabber.pm ↑ Summary WWW/Lipsum.pm »