$source =~ s{ \s+ \Z}{\n}xms;
# Remove the shell fix code from the top of program, if applicable
- ## no critic(ProhibitComplexRegexes)
+ ## no critic (ProhibitComplexRegexes)
my $shebang_re = qr< [#]! [^\015\012]+ [\015\012]+ >xms;
my $shell_re = qr<eval [ ] 'exec [ ] [^\015\012]* [ ] \$0 [ ] \${1[+]"\$@"}'
[ \t]*[\012\015]+ [ \t]* if [^\015\012]+ [\015\012]+ >xms;
# another program. Also, we need to override the
# stdout and stderr redirects that the user may have
# configured in their .perltidyrc file.
- local @ARGV = qw(-nst -nse); ## no critic
+ local @ARGV = qw(-nst -nse);
# Trap Perl::Tidy errors, just in case it dies
my $eval_worked = eval {
#-----------------------------------------------------------------------------
Readonly::Scalar my $DESC => q{Symbols are exported by default};
-Readonly::Scalar my $EXPL => q{Use '@EXPORT_OK' or '%EXPORT_TAGS' instead}; ## no critic
+Readonly::Scalar my $EXPL => q{Use '@EXPORT_OK' or '%EXPORT_TAGS' instead}; ## no critic (RequireInterpolation)
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
-Readonly::Scalar my $DESC => q{No "VERSION" variable found};
+Readonly::Scalar my $DESC => q{No "$VERSION" variable found}; ## no critic (RequireInterpolation)
Readonly::Scalar my $EXPL => [ 404 ];
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
-sub _is_VERSION_declaration { ##no critic(ArgUnpacking)
+sub _is_VERSION_declaration { ## no critic (ArgUnpacking)
return 1 if _is_our_VERSION(@_);
return 1 if _is_vars_VERSION(@_);
return 1 if _is_package_VERSION(@_);
my (undef, $elem) = @_;
$elem->isa('PPI::Statement::Variable') || return 0;
$elem->type() eq 'our' || return 0;
- return any { $_ eq '$VERSION' } $elem->variables(); ## no critic
+ return any { $_ eq '$VERSION' } $elem->variables(); ## no critic (RequireInterpolation)
}
#-----------------------------------------------------------------------------
## use critic
#-----------------------------------------------------------------------------
-sub hashify { ##no critic(ArgUnpacking)
+sub hashify { ## no critic (ArgUnpacking)
return map { $_ => 1 } @_;
}
sub interpolate {
my ( $literal ) = @_;
- return eval "\"$literal\""; ## no critic 'StringyEval';
+ return eval "\"$literal\""; ## no critic (StringyEval);
}
#-----------------------------------------------------------------------------