sub _debug_line {
my ( $options, $line ) = @_;
$line->[2] =~ s/\n\z//g;
- return "line $line->[1] : $line->[0] " . (
+ return "line $line->[1]: $line->[0] " . (
$options->{show_lines} ? qq{: } . _show_whitespace( $line->[2] ) : q{}
);
}
my $file = shift;
my $test_txt;
$test_txt = shift if !ref $_[0];
- $test_txt ||= "No windows line endings in '$file'";
+ $test_txt ||= "No incorrect line endings in '$file'";
my $options = shift if ref $_[0] eq 'HASH';
$options ||= {
trailing_whitespace => 0,
my $file = shift;
return 1 if $file =~ /\.pl$/i;
return 1 if $file =~ /\.t$/;
- open my $fh, $file or return;
+ open (my $fh, $file) or return;
my $first = <$fh>;
return 1 if defined $first && ($first =~ $PERL_PATTERN);
return;