line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Yath::Plugin::ShareDirDist; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
69669
|
use strict; |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
58
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
48
|
|
5
|
2
|
|
|
2
|
|
9
|
use File::Spec; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
47
|
|
6
|
2
|
|
|
2
|
|
10
|
use File::Basename (); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
308
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# ABSTRACT: A prove plugin that works with File::ShareDir::Dist |
9
|
|
|
|
|
|
|
our $VERSION = '0.07'; # VERSION |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub pre_init |
13
|
|
|
|
|
|
|
{ |
14
|
1
|
50
|
|
1
|
0
|
234
|
if(-d "share") |
15
|
|
|
|
|
|
|
{ |
16
|
1
|
|
|
|
|
103
|
my $dist_name = File::Basename::basename(File::Spec->rel2abs(".")); |
17
|
1
|
|
|
|
|
11
|
$ENV{PERL_FILE_SHAREDIR_DIST} = "$dist_name=share"; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
if(eval { require App::Yath::Plugin }) |
22
|
|
|
|
|
|
|
{ |
23
|
|
|
|
|
|
|
our @ISA = ('App::Yath::Plugin'); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |