« lib/Perl/PrereqScanner/NotQuiteLite/Parser/TestRequires.pm
↑ Summary
blib/lib/Perl/PrereqScanner/NotQuiteLite/Parser/KeywordDeclare.pm »
| 1 | package Perl::PrereqScanner::NotQuiteLite::Parser::Catalyst; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 88 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 88 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 88 | ▶ | use Perl::PrereqScanner::NotQuiteLite::Util; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | sub register { return { | ||||||||||||||||||||
| 8 | 87 | ▶ | use => { | ||||||||||||||||||
|
Subroutine
register: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 9 | Catalyst => 'parse_catalyst_args', | ||||||||||||||||||||
| 10 | }, | ||||||||||||||||||||
| 11 | }} | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | sub parse_catalyst_args { | ||||||||||||||||||||
| 14 | 3 | ▶ | my ($class, $c, $used_module, $raw_tokens) = @_; | ||||||||||||||||||
|
Subroutine
parse_catalyst_args: called CC=12 SCAR=25.0
Pod
undocumented
| |||||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | 3 | my @copied_tokens = @$raw_tokens; | |||||||||||||||||||
| 17 | 3 | ▶ | if (($copied_tokens[0][1] || '') eq '()') { | ||||||||||||||||||
|
Branch: 1 branch
Condition50%1/2
$copied_tokens[0][1] || ''
MC/DC0%0/1
$copied_tokens[0][1] || ''
$copied_tokens[0][1]
Truth table50%1/2
A
A= $copied_tokens[0][1]
| |||||||||||||||||||||
| 18 | 2 | my $token = shift @copied_tokens; | |||||||||||||||||||
| 19 | 2 | unshift @copied_tokens, @{$token->[0]}; | |||||||||||||||||||
| 20 | } | ||||||||||||||||||||
| 21 | 3 | ▶ | if (is_version($copied_tokens[0])) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 22 | 0 | $c->add($used_module => shift @copied_tokens); | |||||||||||||||||||
| 23 | } | ||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | 3 | my @plugins; | |||||||||||||||||||
| 26 | 3 | for my $token (@copied_tokens) { | |||||||||||||||||||
| 27 | 14 | ▶ | my $desc = $token->[1] or next; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 28 | 14 | ▶ | if ($desc eq 'STRING') { | ||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||
| 29 | 4 | push @plugins, $token->[0][0]; | |||||||||||||||||||
| 30 | } elsif ($desc eq 'QUOTED_WORD_LIST') { | ||||||||||||||||||||
| 31 | 1 | push @plugins, split /\s/, $token->[0][0]; | |||||||||||||||||||
| 32 | } | ||||||||||||||||||||
| 33 | } | ||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | 3 | for my $plugin (@plugins) { | |||||||||||||||||||
| 36 | 9 | ▶ | next if $plugin =~ /^\-/; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 37 | 8 | ▶ | $plugin = "Catalyst::Plugin::$plugin" unless $plugin =~ s/^\+//; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 38 | 8 | ▶ | $c->add($plugin => 0) if is_module_name($plugin); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 39 | } | ||||||||||||||||||||
| 40 | } | ||||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | 88 | 1; | |||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | __END__ | ||||||||||||||||||||