This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c9bc71
)
Porting/bench.pl: fix 'do' without '.' in @INC
author
David Mitchell
<davem@iabyn.com>
Mon, 3 Apr 2017 16:03:42 +0000
(17:03 +0100)
committer
David Mitchell
<davem@iabyn.com>
Fri, 7 Apr 2017 13:42:24 +0000
(14:42 +0100)
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.
Porting/bench.pl
patch
|
blob
|
blame
|
history
diff --git
a/Porting/bench.pl
b/Porting/bench.pl
index
b073a01
..
efff214
100755
(executable)
--- 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";