« lib/Perl/Critic/Policy/ControlStructures/ProhibitLabelsWithSpecialBlockNames.pm
↑ Summary
lib/Perl/Critic/Policy/ValuesAndExpressions/RequireQuotedHeredocTerminator.pm »
| 1 | package Perl::Critic::Policy::BuiltinFunctions::RequireGlobFunction; | ||||||||||
| 2 | |||||||||||
| 3 | 40 | ▶ | use 5.010001; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 40 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 40 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 40 | ▶ | use Readonly; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 40 | ▶ | use Perl::Critic::Utils qw{ :severities }; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 40 | ▶ | use parent 'Perl::Critic::Policy'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 40 | our $VERSION = '1.156'; | |||||||||
| 12 | |||||||||||
| 13 | #----------------------------------------------------------------------------- | ||||||||||
| 14 | |||||||||||
| 15 | 40 | Readonly::Scalar my $GLOB_RX => qr< [*?] >xms; | |||||||||
| 16 | 40 | Readonly::Scalar my $DESC => q{Glob written as <...>}; | |||||||||
| 17 | 40 | Readonly::Scalar my $EXPL => [ 167 ]; | |||||||||
| 18 | |||||||||||
| 19 | #----------------------------------------------------------------------------- | ||||||||||
| 20 | |||||||||||
| 21 | 90 | ▶ | sub supported_parameters { return () } | ||||||||
|
Subroutine
supported_parameters: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 22 | 74 | ▶ | sub default_severity { return $SEVERITY_HIGHEST } | ||||||||
|
Subroutine
default_severity: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 23 | 91 | ▶ | sub default_themes { return qw( core pbp bugs ) } | ||||||||
|
Subroutine
default_themes: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 24 | 37 | ▶ | sub applies_to { return 'PPI::Token::QuoteLike::Readline' } | ||||||||
|
Subroutine
applies_to: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 25 | |||||||||||
| 26 | #----------------------------------------------------------------------------- | ||||||||||
| 27 | |||||||||||
| 28 | 0 | ▶ | sub violates { | ||||||||
|
Subroutine
violates: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 29 | 0 | my ( $self, $elem, undef ) = @_; | |||||||||
| 30 | |||||||||||
| 31 | 0 | ▶ | if ( $elem =~ $GLOB_RX ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 32 | 0 | return $self->violation( $DESC, $EXPL, $elem ); | |||||||||
| 33 | } | ||||||||||
| 34 | 0 | return; #ok! | |||||||||
| 35 | } | ||||||||||
| 36 | |||||||||||
| 37 | 40 | 1; | |||||||||
| 38 | |||||||||||
| 39 | __END__ | ||||||||||