Subject: | [PATCH] modification of read-only variable errors |
Hi,
I found what appears to be a regression between 0.75 and 0.76.
Code I have which works fine with 0.75, fails with:
Modification of a read-only value attempted at /opt/perl-5.18.1/lib/site_perl/5.18.1/x86_64-linux/Net/DNS/Resolver/Base.pm line 223.
The following patch fixes the issue for me.
Many thanks.
diff --git a/lib/Net/DNS/Resolver/Base.pm b/lib/Net/DNS/Resolver/Base.pm
index 226df90..af0a4b6 100644
--- a/lib/Net/DNS/Resolver/Base.pm
+++ b/lib/Net/DNS/Resolver/Base.pm
@@ -219,6 +219,7 @@ sub read_config_file {
open( FILE, $file ) or croak "Could not open $file: $!";
local $/ = "\n";
+ local $_;
while (<FILE>) {
s/\s*[;#].*$//; # strip comment