From 5e71d5aea1ed54a7686786b222521f483a0540de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A4r=20Karlsson?= Date: Mon, 3 Nov 2014 13:45:45 +0100 Subject: [PATCH] * WgetFeature.pm: Fixed finding of WgetFeature.cfg when using separate build dirs. * WgetFeature.pm: Fixed warning from BLOCK eval, made it indo EXPR eval This fixes 'make distcheck' and removes a warning. --- tests/ChangeLog | 5 +++++ tests/WgetFeature.pm | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/tests/ChangeLog b/tests/ChangeLog index 4b12d7a1..bd000584 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2014-11-03 Pär Karlsson + * WgetFeature.pm: Fixed finding of WgetFeature.cfg when using separate + build dirs. + * WgetFeature.pm: Fixed warning from BLOCK eval, made it indo EXPR eval + 2014-11-03 Tim Ruehsen * added new test Test-proxied-https-auth-keepalive.px diff --git a/tests/WgetFeature.pm b/tests/WgetFeature.pm index 880a2386..28e0c114 100644 --- a/tests/WgetFeature.pm +++ b/tests/WgetFeature.pm @@ -7,18 +7,18 @@ our $VERSION = 0.01; use Carp; use English qw(-no_match_vars); +use FindBin; use WgetTests; our %SKIP_MESSAGES; { - open my $fh, '<', 'WgetFeature.cfg' - or croak "Cannot open 'WgetFeature.cfg': $ERRNO"; + my $cfgfile = "$FindBin::Bin/WgetFeature.cfg"; + open my $fh, '<', $cfgfile + or croak "Cannot open '$cfgfile': $ERRNO"; my @lines = <$fh>; - close $fh or carp "Cannot close 'WgetFeature.cfg': $ERRNO"; - eval { - @lines; - 1; - } or carp "Cannot eval 'WgetFeature.cfg': $ERRNO"; + close $fh or carp "Cannot close '$cfgfile': $ERRNO"; + my $evalstr = join q{}, @lines; + eval { $evalstr } or carp "Cannot eval '$cfgfile': $ERRNO"; } sub import