Skip to content

Commit

Permalink
perlcritic: Don't use while with implicit assignment to status
Browse files Browse the repository at this point in the history
  • Loading branch information
jknphy committed May 3, 2019
1 parent ee94a6c commit 7d527de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/mm_network.pm
Expand Up @@ -27,12 +27,12 @@ sub configure_hostname {
sub get_host_resolv_conf {
my %conf;
open(my $fh, '<', "/etc/resolv.conf");
while (<$fh>) {
if (/^nameserver\s+([0-9.]+)\s*$/) {
while (my $line = <$fh>) {
if ($line =~ /^nameserver\s+([0-9.]+)\s*$/) {
$conf{nameserver} //= [];
push @{$conf{nameserver}}, $1;
}
if (/search\s+(.+)\s*$/) {
if ($line =~ /search\s+(.+)\s*$/) {
$conf{search} = $1;
}
}
Expand Down

0 comments on commit 7d527de

Please sign in to comment.