« 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') || []
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')
| |||||||||||||||||||||
| 23 | 269 | for my $node ( @$includes ) { | |||||||||||||||||||
| 24 | 191 | ▶ | if ( $node->module eq 'POE' ) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 25 | my @meat = grep { | ||||||||||||||||||||
| 26 | 6 | ▶ | $_->isa('PPI::Token::QuoteLike::Words') | ||||||||||||||||||
|
Condition66%2/3
$_->isa('PPI::Token::QuoteLike::Words') || $_->isa('PPI::Token::Quote')
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')
| |||||||||||||||||||||
| 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__ | ||||||||||||||||||||