| 1 | package App::Yath::Plugin::ShareDirDist; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 2 | ▶ | use File::Spec; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 2 | ▶ | use File::Basename (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | # ABSTRACT: A prove plugin that works with File::ShareDir::Dist | ||||||||||
| 9 | 2 | our $VERSION = '0.07'; # VERSION | |||||||||
| 10 | |||||||||||
| 11 | |||||||||||
| 12 | sub pre_init | ||||||||||
| 13 | 1 | ▶ | { | ||||||||
|
Subroutine
pre_init: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||
| 14 | 1 | ▶ | if(-d "share") | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | { | ||||||||||
| 16 | 1 | my $dist_name = File::Basename::basename(File::Spec->rel2abs(".")); | |||||||||
| 17 | 1 | $ENV{PERL_FILE_SHAREDIR_DIST} = "$dist_name=share"; | |||||||||
| 18 | } | ||||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | 2 | ▶ | if(eval { require App::Yath::Plugin }) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | { | ||||||||||
| 23 | 0 | our @ISA = ('App::Yath::Plugin'); | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 2 | 1; | |||||||||
| 27 | |||||||||||
| 28 | __END__ | ||||||||||