Skip to content

Commit 4f3cdae

Browse files
committed
t/perf/speed.t: clean up code
- set @inc before loading any modules - don't enable strict/warnings twice - 'use Config' instead of 'require Config; Config->import' - don't declare non-existent sub run_tests - mention github issue number in comment in addition to RT
1 parent ec66b5b commit 4f3cdae

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

t/perf/speed.t

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,30 @@
1111
# run, rather than actually timing out.
1212
#
1313

14-
use strict;
15-
use warnings;
16-
use 5.010;
17-
18-
sub run_tests;
19-
20-
$| = 1;
21-
22-
2314
BEGIN {
2415
chdir 't' if -d 't';
2516
@INC = ('../lib');
26-
require Config; Config->import;
2717
require './test.pl';
2818
}
19+
use Config;
2920

30-
plan tests => 1;
31-
32-
use warnings;
3321
use strict;
22+
use warnings;
23+
use 5.010;
24+
25+
$| = 1;
26+
27+
plan tests => 1;
3428

3529
watchdog(60);
3630

3731
SKIP: {
38-
# RT #121975 COW speedup lost after e8c6a474
32+
# RT #121975 / GH #13878 COW speedup lost after e8c6a474
3933

4034
# without COW, this test takes minutes; with COW, its less than a
4135
# second
4236
#
43-
skip "PERL_NO_COW", 1 if $Config{ccflags} =~ /PERL_NO_COW/;
37+
skip "PERL_NO_COW", 1 if $Config{ccflags} =~ /PERL_NO_COW/;
4438

4539
my ($x, $y);
4640
$x = "x" x 1_000_000;

0 commit comments

Comments
 (0)