Skip to content

Commit

Permalink
Porting/checkpodencoding.pl: Drop dependency on smartmatch
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugmeir authored and Karl Williamson committed Mar 27, 2013
1 parent 44bda13 commit df711a6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Porting/checkpodencoding.pl
Expand Up @@ -30,21 +30,21 @@ sub finder {

next if
# Test cases
$file ~~ m[Pod-Simple/t];
$file =~ m[Pod-Simple/t];

my ($in_pod, $has_encoding, @non_ascii);

FILE: while (my $line = <$fh>) {
chomp $line;
if ($line ~~ /^=[a-z]+/) {
if ($line =~ /^=[a-z]+/) {
$in_pod = 1;
}

if ($in_pod) {
if ($line ~~ /^=encoding (\S+)/) {
if ($line =~ /^=encoding (\S+)/) {
$has_encoding = 1;
last FILE;
} elsif ($line ~~ /[^[:ascii:]]/) {
} elsif ($line =~ /[^[:ascii:]]/) {
my $encoding = guess_encoding($line);
push @non_ascii => {
num => $.,
Expand All @@ -54,7 +54,7 @@ sub finder {
}
}

if ($line ~~ /^=cut/) {
if ($line =~ /^=cut/) {
$in_pod = 0;
}
}
Expand Down

0 comments on commit df711a6

Please sign in to comment.