Skip Menu |

This queue is for tickets about the Net-DNS CPAN distribution.

Report information
The Basics
Id: 127557
Status: resolved
Priority: 0/
Queue: Net-DNS

People
Owner: Nobody in particular
Requestors: me [...] eboxr.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.19



Subject: Net::DNS::Resolver::Base should use 3 args open
Suggested patch for the Base.pm note that we should also consider patching - Resolver/cygwin.pm - Resolver/os390.pm
Subject: 3args.patch
+index db93167ed..f30e528f1 100644 +--- a/Net/DNS/Resolver/Base.pm ++++ b/Net/DNS/Resolver/Base.pm +@@ -176,14 +176,14 @@ sub _read_config_file { ## read resolver config file + my $self = shift; + my $file = shift; + +- local *FILE; +- open( FILE, $file ) or croak "$file: $!"; ++ my $fh; ++ open( $fh, '<', $file ) or croak "$file: $!"; + + my @nameserver; + my @searchlist; + + local $_; +- while (<FILE>) { ++ while (<$fh>) { + s/[;#].*$//; # strip comments + + /^nameserver/ && do { +@@ -212,7 +212,7 @@ sub _read_config_file { ## read resolver config file + }; + } + +- close(FILE); ++ close($fh); + + $self->nameservers(@nameserver) if @nameserver; + $self->searchlist(@searchlist) if @searchlist;
On Fri Nov 02 13:45:50 2018, atoomic wrote: Show quoted text
> Suggested patch for the Base.pm > > note that we should also consider patching > - Resolver/cygwin.pm > - Resolver/os390.pm >
can also view/comment the patch online on GitHub here: https://github.com/wtoorop/Net-DNS/pull/1
On Fri Nov 02 13:45:50 2018, atoomic wrote: Show quoted text
> Suggested patch for the Base.pm
Agree, it should use explicit mode. Show quoted text
> note that we should also consider patching > - Resolver/cygwin.pm > - Resolver/os390.pm
Same