blib/lib/auto/share/dist/Module-Provision/boilerplate_whitelist.pm untested

filter: Statementstmt 0.0% 0 / 56 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 24 MC/DCmcdc 0.0% 0 / 13 Subroutinesub 0.0% 0 / 14 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 116 CC 4 SCAR 14.4
CC
4
Cov
0%
BEGIN
12.0
import
6.0
plan
2.0
CRAP 4.2
1 package t::boilerplate;
2  
3 use strict;
4 use warnings;
5 use File::Spec::Functions qw( catdir catfile updir );
6 use FindBin qw( $Bin );
7 use lib catdir( $Bin, updir, 'lib' ), catdir( $Bin, 'lib' );
8  
9 use Module::Build;
10 use Sys::Hostname;
11  
12 sub plan (;@) {
13 $_[ 0 ] eq 'skip_all' and print '1..0 # SKIP '.$_[ 1 ]."\n" and exit 0;
14 }
15  
16 my ($builder, $host, $notes, $perl_ver);
17  
18 BEGIN {
19 $host = lc hostname;
20 $builder = eval { Module::Build->current };
21 $notes = $builder ? $builder->notes : {};
22 $perl_ver = $notes->{min_perl_version} || 5.008;
23  
24 eval { require Test::Requires }; $@ and plan skip_all => 'No Test::Requires';
25  
26 $Bin =~ m{ : .+ : }mx and plan skip_all => 'Two colons in $Bin path';
27  
28 if ($notes->{testing}) {
29 my $dumped = catfile( 't', 'whitelist.dd' );
30 my $include = {}; -f $dumped and $include = do $dumped;
31 my $hit = 0;
32  
33 for my $key (keys %{ $include }) {
34 $host =~ m{ $key \z }mx and $hit = 1 and last;
35 }
36  
37 $hit or plan skip_all => 'Not a whitelisted smoker';
38 }
39 }
40  
41 use Test::Requires "${perl_ver}";
42 use Test::Requires { version => 0.88 };
43  
44 use version; our $VERSION = qv( '0.4' );
45  
46 sub import {
47 strict->import;
48 $] < 5.008 ? warnings->import : warnings->import( NONFATAL => 'all' );
49 return;
50 }
51  
52 1;
53  
54 # Local Variables:
55 # mode: perl
56 # tab-width: 3
57 # End:
58 # vim: expandtab shiftwidth=3: