« lib/Perl/PrereqScanner/NotQuiteLite/Parser/Inline.pm
↑ Summary
lib/Perl/PrereqScanner/NotQuiteLite/Parser/Only.pm »
| 1 | package Perl::PrereqScanner::NotQuiteLite::Parser::TestMore; | ||||||||||||||||||
| 2 | |||||||||||||||||||
| 3 | 89 | ▶ | use strict; | ||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||
| 4 | 89 | ▶ | use warnings; | ||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||
| 5 | 89 | ▶ | use Perl::PrereqScanner::NotQuiteLite::Util; | ||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||
| 6 | |||||||||||||||||||
| 7 | sub register { return { | ||||||||||||||||||
| 8 | 88 | ▶ | use => { | ||||||||||||||||
|
Subroutine
register: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||
| 9 | 'Test::More' => 'parse_test_more_args', | ||||||||||||||||||
| 10 | }, | ||||||||||||||||||
| 11 | }} | ||||||||||||||||||
| 12 | |||||||||||||||||||
| 13 | sub register_fqfn { return +{ | ||||||||||||||||||
| 14 | 746 | ▶ | 'Test::More::done_testing' => 'parse_done_testing_args', | ||||||||||||||||
|
Subroutine
register_fqfn: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||
| 15 | 'Test::More::plan' => 'parse_plan_args', | ||||||||||||||||||
| 16 | }} | ||||||||||||||||||
| 17 | |||||||||||||||||||
| 18 | sub parse_test_more_args { | ||||||||||||||||||
| 19 | 19 | ▶ | my ($class, $c, $used_module, $raw_tokens) = @_; | ||||||||||||||||
|
Subroutine
parse_test_more_args: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||
| 20 | |||||||||||||||||||
| 21 | 19 | $c->register_keyword_parser( | |||||||||||||||||
| 22 | 'done_testing', | ||||||||||||||||||
| 23 | [$class, 'parse_done_testing_args', $used_module], | ||||||||||||||||||
| 24 | ); | ||||||||||||||||||
| 25 | |||||||||||||||||||
| 26 | 19 | $c->register_keyword_parser( | |||||||||||||||||
| 27 | 'plan', | ||||||||||||||||||
| 28 | [$class, 'parse_plan_args', $used_module], | ||||||||||||||||||
| 29 | ); | ||||||||||||||||||
| 30 | } | ||||||||||||||||||
| 31 | |||||||||||||||||||
| 32 | sub parse_done_testing_args { | ||||||||||||||||||
| 33 | 4 | ▶ | my ($class, $c, $used_module, $raw_tokens) = @_; | ||||||||||||||||
|
Subroutine
parse_done_testing_args: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||
| 34 | |||||||||||||||||||
| 35 | 4 | $c->add($used_module => '0.88'); | |||||||||||||||||
| 36 | } | ||||||||||||||||||
| 37 | |||||||||||||||||||
| 38 | sub parse_plan_args { | ||||||||||||||||||
| 39 | 8 | ▶ | my ($class, $c, $used_module, $raw_tokens) = @_; | ||||||||||||||||
|
Subroutine
parse_plan_args: called CC=7 SCAR=19.9
Pod
undocumented
| |||||||||||||||||||
| 40 | |||||||||||||||||||
| 41 | 8 | my $tokens = convert_string_tokens($raw_tokens); | |||||||||||||||||
| 42 | 8 | shift @$tokens; # discard plan | |||||||||||||||||
| 43 | |||||||||||||||||||
| 44 | 8 | ▶ | my $first_token = $tokens->[0] or return; | ||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||
| 45 | 8 | ▶ | $first_token = $first_token->[0] if ref $first_token; | ||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||
| 46 | |||||||||||||||||||
| 47 | 8 | ▶ | if ($first_token eq 'skip_all') { | ||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||
| 48 | 8 | ▶ | if (grep {$_->[0] eq '{' and $_->[2] eq 'BEGIN'} @{$c->{stack} || []}) { | ||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||
| 49 | 5 | $c->{force_cond} = 1; | |||||||||||||||||
| 50 | } | ||||||||||||||||||
| 51 | } | ||||||||||||||||||
| 52 | } | ||||||||||||||||||
| 53 | |||||||||||||||||||
| 54 | 89 | 1; | |||||||||||||||||
| 55 | |||||||||||||||||||
| 56 | __END__ | ||||||||||||||||||