blib/lib/Perl/PrereqScanner/Scanner/POE.pm

filter: Statementstmt 100% 20 / 20 Branchbran 100% 2 / 2 Conditioncond 80.0% 4 / 5 MC/DCmcdc 33.3% 1 / 3 Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 88.5% 31 / 35 CC 6 SCAR 14.7
CC
6
Cov
96%
scan_for_prereqs
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 4.3
« blib/lib/Perl/PrereqScanner/Scanner/Superclass.pm ↑ Summary blib/lib/Perl/PrereqScanner/Scanner/Aliased.pm »
1 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Perl::PrereqScanner::Scanner::POE 1.100;
5 # ABSTRACT: scan for POE components
6  
7 4 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 4 with 'Perl::PrereqScanner::Scanner';
9  
10 #pod =head1 DESCRIPTION
11 #pod
12 #pod This scanner will look for POE modules included with C<use POE>
13 #pod
14 #pod use POE wq(Component::IRC);
15 #pod
16 #pod =cut
17  
18 269 ▶sub scan_for_prereqs {
Subroutine scan_for_prereqs: called CC=6 SCAR=17.9
Pod undocumented
19 269 my ($self, $ppi_doc, $req) = @_;
20  
21 # regular use and require
22 269 ▶ my $includes = $ppi_doc->find('Statement::Include') || [];
Condition100%2/2
$ppi_doc->find('Statement::Include') || []
l!l
137132
MC/DC100%1/1
$ppi_doc->find('Statement::Include') || []
$ppi_doc->find('Statement::Include')
Truth table100%2/2
A
A= $ppi_doc->find('Statement::Include')
Aresult
11
00
23 269 for my $node ( @$includes ) {
24 191 ▶ if ( $node->module eq 'POE' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($node->module eq "POE") 6 185 191
25 my @meat = grep {
26 6 ▶ $_->isa('PPI::Token::QuoteLike::Words')
Condition66%2/3
$_->isa('PPI::Token::QuoteLike::Words') || $_->isa('PPI::Token::Quote')
l!l&&r!l&&!r
330
MC/DC0%0/2
$_->isa('PPI::Token::QuoteLike::Words') || $_->isa('PPI::Token::Quote')
$_->isa('PPI::Token::QuoteLike::Words') $_->isa('PPI::Token::Quote')
Truth table66%2/3
A || B
A= $_->isa('PPI::Token::QuoteLike::Words')B= $_->isa('PPI::Token::Quote')
ABresult
1X1
011
000
27 || $_->isa('PPI::Token::Quote')
28 } $node->arguments;
29  
30 6 my @components = map { $self->_q_contents($_) } @meat;
31 6 $req->add_minimum("POE::$_" => 0) for @components;
32 }
33 }
34 }
35  
36 4 1;
37  
38 __END__
« blib/lib/Perl/PrereqScanner/Scanner/Superclass.pm ↑ Summary blib/lib/Perl/PrereqScanner/Scanner/Aliased.pm »