line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package exact::me; |
2
|
|
|
|
|
|
|
# ABSTRACT: Original program path locations extension for exact |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
222695
|
use 5.014; |
|
1
|
|
|
|
|
11
|
|
5
|
1
|
|
|
1
|
|
5
|
use exact; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
6
|
1
|
|
|
1
|
|
721
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
16
|
|
7
|
1
|
|
|
1
|
|
429
|
use FindBin; |
|
1
|
|
|
|
|
923
|
|
|
1
|
|
|
|
|
87
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '1.03'; # VERSION |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub import { |
12
|
1
|
|
|
1
|
|
23
|
my ( $self, $caller ) = @_; |
13
|
1
|
|
33
|
|
|
3
|
$caller //= caller(); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
{ |
16
|
1
|
|
|
1
|
|
6
|
no strict 'refs'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
342
|
|
|
1
|
|
|
|
|
2
|
|
17
|
1
|
50
|
|
|
|
2
|
*{ $caller . '::me' } = \&me unless ( defined &{ $caller . '::me' } ); |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
7
|
|
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub me { |
22
|
3
|
|
|
3
|
1
|
6315
|
my ($path) = @_; |
23
|
|
|
|
|
|
|
|
24
|
3
|
100
|
|
|
|
11
|
unless ($path) { |
|
|
100
|
|
|
|
|
|
25
|
1
|
|
|
|
|
2
|
return $FindBin::Bin; |
26
|
|
|
|
|
|
|
} |
27
|
0
|
|
|
|
|
0
|
elsif ( index( $path, '.', 0 ) == 0 ) { |
28
|
1
|
|
|
|
|
4
|
return $FindBin::Bin . '/' . $path; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
else { |
31
|
1
|
|
|
|
|
3
|
return _find_dir($path); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
0
|
return; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub _find_dir { |
38
|
1
|
|
|
1
|
|
4
|
my ($suffix) = @_; |
39
|
|
|
|
|
|
|
|
40
|
1
|
|
|
|
|
5
|
my @search_path = split( '/', $FindBin::Bin ); |
41
|
1
|
|
|
|
|
4
|
while ( @search_path > 0 ) { |
42
|
6
|
|
|
|
|
14
|
my $dir = join( '/', @search_path, $suffix ); |
43
|
6
|
50
|
|
|
|
154
|
return $dir if ( -d $dir ); |
44
|
6
|
|
|
|
|
24
|
pop @search_path; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
1
|
|
|
|
|
22
|
return; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
__END__ |