« Perl/Lint/Policy/ValuesAndExpressions/ProhibitEscapedCharacters.pm
↑ Summary
Perl/Lint/Policy/ValuesAndExpressions/RequireQuotedHeredocTerminator.pm »
| 1 | package Perl::Lint::Policy::Subroutines::ProhibitSubroutinePrototypes; | ||||||||||
| 2 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use Perl::Lint::Constants::Type; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 2 | ▶ | use parent "Perl::Lint::Policy"; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 2 | ▶ | use constant { | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 2 | DESC => 'Subroutine prototypes used', | |||||||||
| 9 | EXPL => [194], | ||||||||||
| 10 | 2 | }; | |||||||||
| 11 | |||||||||||
| 12 | 0 | ▶ | sub evaluate { | ||||||||
|
Subroutine
evaluate: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||
| 13 | 0 | my ($class, $file, $tokens, $args) = @_; | |||||||||
| 14 | |||||||||||
| 15 | 0 | my @violations; | |||||||||
| 16 | 0 | ▶ | for (my $i = 0; my $token = $tokens->[$i]; $i++) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | 0 | my $token_type = $token->{type}; | |||||||||
| 18 | 0 | ▶ | if ($token_type == PROTOTYPE) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | push @violations, { | ||||||||||
| 20 | filename => $file, | ||||||||||
| 21 | line => $token->{line}, | ||||||||||
| 22 | 0 | description => DESC, | |||||||||
| 23 | explanation => EXPL, | ||||||||||
| 24 | policy => __PACKAGE__, | ||||||||||
| 25 | }; | ||||||||||
| 26 | 0 | next; | |||||||||
| 27 | } | ||||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 0 | return \@violations; | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 2 | 1; | |||||||||
| 34 | |||||||||||