| 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::TestMore 1.100; | ||||||||||||||||||||
| 5 | # ABSTRACT: scanner to find recent Test::More usage | ||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 4 | ▶ | use Moo; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | 4 | ▶ | use List::Util 1.33 'none'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | 4 | with 'Perl::PrereqScanner::Scanner'; | |||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 269 | ▶ | sub scan_for_prereqs { | ||||||||||||||||||
|
Subroutine
scan_for_prereqs: called CC=6 SCAR=18.5
Pod
undocumented
| |||||||||||||||||||||
| 12 | 269 | my ($self, $ppi_doc, $req) = @_; | |||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 269 | ▶ | return if none { $_ eq 'Test::More' } $req->required_modules; | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
| |||||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | $req->add_minimum('Test::More' => '0.88') if grep { | ||||||||||||||||||||
| 17 | 3 | ▶ | $_->isa('PPI::Token::Word') && $_->content eq 'done_testing'; | ||||||||||||||||||
|
Condition33%1/3
$_->isa('PPI::Token::Word') && $_->content eq 'done_testing'
MC/DC0%0/2
$_->isa('PPI::Token::Word') && $_->content eq 'done_testing'
$_->isa('PPI::Token::Word')
$_->content eq 'done_testing'
Truth table33%1/3
A && B
A= $_->isa('PPI::Token::Word')B= $_->content eq 'done_testing'
| |||||||||||||||||||||
| 18 | } map { | ||||||||||||||||||||
| 19 | 9 | my @c = $_->children; | |||||||||||||||||||
| 20 | 9 | ▶ | @c == 1 ? @c : () | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 21 | 3 | ▶ | } @{ $ppi_doc->find('Statement') || [] } | ||||||||||||||||||
|
Branch: 1 branch
Condition50%1/2
$ppi_doc->find('Statement') || []
MC/DC0%0/1
$ppi_doc->find('Statement') || []
$ppi_doc->find('Statement')
Truth table50%1/2
A
A= $ppi_doc->find('Statement')
| |||||||||||||||||||||
| 22 | } | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 4 | 1; | |||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | =pod | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | =encoding UTF-8 | ||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | =head1 NAME | ||||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | Perl::PrereqScanner::Scanner::TestMore - scanner to find recent Test::More usage | ||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | =head1 VERSION | ||||||||||||||||||||
| 35 | |||||||||||||||||||||
| 36 | version 1.100 | ||||||||||||||||||||
| 37 | |||||||||||||||||||||
| 38 | =head1 DESCRIPTION | ||||||||||||||||||||
| 39 | |||||||||||||||||||||
| 40 | This scanner will check if a given test is using recent functions from | ||||||||||||||||||||
| 41 | L<Test::More>, and increase the minimum version for this module | ||||||||||||||||||||
| 42 | accordingly. | ||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | =head1 PERL VERSION | ||||||||||||||||||||
| 45 | |||||||||||||||||||||
| 46 | This library should run on perls released even a long time ago. It should work | ||||||||||||||||||||
| 47 | on any version of perl released in the last five years. | ||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | Although it may work on older versions of perl, no guarantee is made that the | ||||||||||||||||||||
| 50 | minimum required version will not be increased. The version may be increased | ||||||||||||||||||||
| 51 | for any reason, and there is no promise that patches will be accepted to lower | ||||||||||||||||||||
| 52 | the minimum required perl. | ||||||||||||||||||||
| 53 | |||||||||||||||||||||
| 54 | =head1 AUTHORS | ||||||||||||||||||||
| 55 | |||||||||||||||||||||
| 56 | =over 4 | ||||||||||||||||||||
| 57 | |||||||||||||||||||||
| 58 | =item * | ||||||||||||||||||||
| 59 | |||||||||||||||||||||
| 60 | Jerome Quelin | ||||||||||||||||||||
| 61 | |||||||||||||||||||||
| 62 | =item * | ||||||||||||||||||||
| 63 | |||||||||||||||||||||
| 64 | Ricardo Signes <cpan@semiotic.systems> | ||||||||||||||||||||
| 65 | |||||||||||||||||||||
| 66 | =back | ||||||||||||||||||||
| 67 | |||||||||||||||||||||
| 68 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||
| 69 | |||||||||||||||||||||
| 70 | This software is copyright (c) 2009 by Jerome Quelin. | ||||||||||||||||||||
| 71 | |||||||||||||||||||||
| 72 | This is free software; you can redistribute it and/or modify it under | ||||||||||||||||||||
| 73 | the same terms as the Perl 5 programming language system itself. | ||||||||||||||||||||
| 74 | |||||||||||||||||||||
| 75 | =cut | ||||||||||||||||||||
| 76 | |||||||||||||||||||||
| 77 | __END__ | ||||||||||||||||||||