diff options
author | David Mitchell <davem@iabyn.com> | 2017-04-03 17:03:42 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2017-04-07 14:42:24 +0100 |
commit | ea572010a87173fe35caf8ebdb714741677b42b6 (patch) | |
tree | 6372a6834394327202c02921ab709b358b00cdf5 | |
parent | 4c9bc717a2836a3d36cd817c16939349043504aa (diff) | |
download | perl-ea572010a87173fe35caf8ebdb714741677b42b6.tar.gz |
Porting/bench.pl: fix 'do' without '.' in @INC
The --benchfile arg (default t/perf/benchmarks) is supposed to be loaded
via 'do'. With '.' no longer in @INC by default, it doesn't find files
with relative paths.
-rwxr-xr-x | Porting/bench.pl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Porting/bench.pl b/Porting/bench.pl index b073a0198b..efff214e7a 100755 --- a/Porting/bench.pl +++ b/Porting/bench.pl @@ -504,7 +504,11 @@ sub filter_tests { sub read_tests_file { my ($file) = @_; - my $ta = do $file; + my $ta; + { + local @INC = ('.'); + $ta = do $file; + } unless ($ta) { die "Error: can't parse '$file': $@\n" if $@; die "Error: can't read '$file': $!\n"; |