line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package TestConstants; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
9
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
31
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
113
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
require Exporter; |
7
|
|
|
|
|
|
|
our @ISA = qw/Exporter/; |
8
|
|
|
|
|
|
|
our @EXPORT = qw/SAMPLE_SIZE |
9
|
|
|
|
|
|
|
HOME_DIR SIMPLE_DIR EMPTY_DIR REC_DIR |
10
|
|
|
|
|
|
|
SIMPLE_FILES SIMPLE_FILES_WITH_NR SIMPLE_FILES_WITH_DOT |
11
|
|
|
|
|
|
|
REC_FILES REC_TOP_FILES REC_ODD_FILES |
12
|
|
|
|
|
|
|
SIMPLE_CONTENTS |
13
|
|
|
|
|
|
|
REC_CONTENTS |
14
|
|
|
|
|
|
|
no_slash with_slash/; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our @EXPORT_OK = @EXPORT; |
17
|
|
|
|
|
|
|
our %EXPORT_TAGS = (); |
18
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
7
|
use Test::More; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
12
|
|
21
|
1
|
|
|
1
|
|
315
|
use Test::Exception; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
1
|
|
209
|
use Set::Scalar; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
24
|
1
|
|
|
1
|
|
6
|
use Data::Dumper; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
25
|
|
|
|
|
|
|
|
26
|
1
|
|
|
1
|
|
13
|
use Cwd; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
119
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub files { |
29
|
5
|
|
|
5
|
0
|
12
|
return map {"file$_"} @_; |
|
17
|
|
|
|
|
325
|
|
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
1
|
|
7
|
use constant HOME_DIR => cwd() . '/test'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
3412
|
|
33
|
1
|
|
|
1
|
|
32
|
use constant SIMPLE_DIR => cwd() . '/test/dir'; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
2470
|
|
34
|
1
|
|
|
1
|
|
32
|
use constant EMPTY_DIR => SIMPLE_DIR . '/empty'; |
|
1
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
87
|
|
35
|
1
|
|
|
1
|
|
14
|
use constant REC_DIR => SIMPLE_DIR . '/rec'; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
97
|
|
36
|
|
|
|
|
|
|
|
37
|
1
|
|
|
1
|
|
13
|
use constant SIMPLE_FILES_WITH_NR => files(1 .. 5); |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
5
|
|
38
|
1
|
|
|
1
|
|
7
|
use constant SIMPLE_FILES_WITH_DOT => qw/x.dat y.dat z.dat/; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
87
|
|
39
|
1
|
|
|
|
|
83
|
use constant SIMPLE_FILES => SIMPLE_FILES_WITH_NR, |
40
|
1
|
|
|
1
|
|
6
|
SIMPLE_FILES_WITH_DOT; |
|
1
|
|
|
|
|
1
|
|
41
|
|
|
|
|
|
|
|
42
|
1
|
|
|
1
|
|
12
|
use constant REC_TOP_FILES => files(1 .. 3); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3
|
|
43
|
|
|
|
|
|
|
use constant REC_FILES => REC_TOP_FILES, |
44
|
3
|
|
|
|
|
7
|
map( {"sub1/$_"} files(4 .. 6) ), |
45
|
3
|
|
|
|
|
6
|
map( {"sub1/subsub/$_"} files(7 .. 9) ), |
46
|
1
|
|
|
1
|
|
7
|
map( {"sub2/$_"} files(10 .. 12) ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
110
|
|
47
|
1
|
|
|
1
|
|
15
|
use constant REC_ODD_FILES => grep m/[13579]$/, REC_FILES; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
93
|
|
48
|
|
|
|
|
|
|
|
49
|
1
|
|
|
1
|
|
9
|
use constant REC_CONTENTS => map {"Content: $_"} REC_FILES; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
2
|
|
|
12
|
|
|
|
|
116
|
|
50
|
5
|
|
|
|
|
26
|
use constant SIMPLE_CONTENTS => ( map({"Content: $_"} SIMPLE_FILES_WITH_NR), |
51
|
1
|
|
|
|
|
3
|
map({"line 0\nline 1\nline 2\n$_\nline 4"} |
|
3
|
|
|
|
|
59
|
|
52
|
1
|
|
|
1
|
|
7
|
SIMPLE_FILES_WITH_DOT) ); |
|
1
|
|
|
|
|
2
|
|
53
|
|
|
|
|
|
|
|
54
|
1
|
|
|
1
|
|
18
|
use constant SAMPLE_SIZE => 250; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
189
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub no_slash { |
57
|
4
|
|
|
4
|
0
|
6
|
my $path = shift; |
58
|
4
|
|
|
|
|
35
|
$path =~ s:[/\\]*$::; |
59
|
4
|
|
|
|
|
190
|
return $path; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub with_slash { |
63
|
2
|
|
|
2
|
0
|
4
|
no_slash(shift()) . '/'; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |