I realized I got rid of one warning only to produce another in the test
suite.

The issue was the syntax of the eval statement in WgetFeature.pm that
essentially does what we want, but that produces a warning about using a
string or array in void context (meaning it should't normally do something,
except that we are doing in in an eval() ).

Changed the eval into a proper string eval, which stops the warning.

Sorry, about the messup!

Best regards,

/Pär

2014-11-01 18:13 GMT+01:00 Darshit Shah <dar...@gmail.com>:

> On 11/01, Pär Karlsson wrote:
>
>> Sorry, my bad. :-/ Amended in new patch attached.
>>
>
> Pushed. Thanks for the contribution!
>
>
>
> --
> Thanking You,
> Darshit Shah
>
From c189e59f18a4a9d0e2cf8a88bb19d7042031793d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A4r=20Karlsson?= <feino...@gmail.com>
Date: Sun, 2 Nov 2014 21:26:53 +0100
Subject: [PATCH] Fixed eval syntax that generated unnecessary warnings in
 WgetFeature.pm

---
 tests/ChangeLog      | 3 +++
 tests/WgetFeature.pm | 6 ++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/ChangeLog b/tests/ChangeLog
index 5097871..e3101f7 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,6 @@
+2014-11-02  Pär Karlsson <feino...@gmail.com>
+	* WgetFeature.pm: Corrected block eval to string eval
+
 2014-10-31  Pär Karlsson <feino...@gmail.com>
 	* WgetTests.pm: Proper conditional operators, tidied up code, idiomatic
 	improvements as per modern Perl best practices.
diff --git a/tests/WgetFeature.pm b/tests/WgetFeature.pm
index 880a238..64e35cf 100644
--- a/tests/WgetFeature.pm
+++ b/tests/WgetFeature.pm
@@ -15,10 +15,8 @@ our %SKIP_MESSAGES;
       or croak "Cannot open 'WgetFeature.cfg': $ERRNO";
     my @lines = <$fh>;
     close $fh or carp "Cannot close 'WgetFeature.cfg': $ERRNO";
-    eval {
-        @lines;
-        1;
-    } or carp "Cannot eval 'WgetFeature.cfg': $ERRNO";
+    my $evalstring = join q{}, @lines;
+    eval { $evalstring } or carp "Cannot eval 'WgetFeature.cfg': $ERRNO";
 }
 
 sub import
-- 
2.0.4

Reply via email to