File Coverage

blib/lib/Range/Merge/Boilerplate.pm
Criterion Covered Total %
statement 44 56 78.5
branch 7 14 50.0
condition n/a
subroutine 8 8 100.0
pod n/a
total 59 78 75.6


line stmt bran cond sub pod time code
1             #
2             # Copyright (C) 2015,2016 Joel C. Maslak
3             # All Rights Reserved - See License
4             #
5              
6             package Range::Merge::Boilerplate v0.01.11;
7             # ABSTRACT: Generic Boilerplate (copied from JCM::Bootstrap)
8             $Range::Merge::Boilerplate::VERSION = '1.002';
9              
10 4     4   279869 use v5.22;
  4         9  
11 4     4   12 use strict;
  4         5  
  4         66  
12              
13 4     4   12 use feature 'signatures';
  4         5  
  4         373  
14 4     4   13 no warnings 'experimental::signatures';
  4         4  
  4         102  
15              
16 4     4   1718 use English;
  4         10048  
  4         17  
17 4     4   3390 use Import::Into;
  4         8556  
  4         118  
18 4     4   2115 use Smart::Comments;
  4         100267  
  4         18  
19              
20 8 50   8   56 sub import($self, $type='script') {
  8 50       18  
  8 50       11  
  8         21  
  8         33  
21 8 50       39 ### assert: ($type =~ m/^(?:class|role|script)$/ms)
  0         0  
  0         0  
  0         0  
  0         0  
22            
23 8         15 my $target = caller;
24              
25 8         40 strict->import::into($target);
26 8         1227 warnings->import::into($target);
27 8         974 autodie->import::into($target);
28              
29 8         69513 feature->import::into($target, ':5.22');
30              
31 8         1711 utf8->import::into($target); # Allow UTF-8 Source
32              
33 8 50       1600 if ($type eq 'class') {
    50          
34 0         0 Moose->import::into($target);
35 0         0 Moose::Util::TypeConstraints->import::into($target);
36 0         0 MooseX::StrictConstructor->import::into($target);
37 0         0 namespace::autoclean->import::into($target);
38             } elsif ($type eq 'role') {
39 0         0 Moose::Role->import::into($target);
40 0         0 Moose::Util::TypeConstraints->import::into($target);
41 0         0 MooseX::StrictConstructor->import::into($target);
42 0         0 namespace::autoclean->import::into($target);
43             }
44              
45 8         30 Carp->import::into($target);
46 8         1213 English->import::into($target);
47 8         3130 Smart::Comments->import::into($target, '-ENV', '###');
48              
49 8         1340 feature->import::into($target, 'postderef'); # Not needed if feature budle >= 5.23.1
50              
51             # We haven't been using this
52             # feature->import::into($target, 'refaliasing');
53 8         1052 feature->import::into($target, 'signatures');
54              
55 8         1001 feature->import::into($target, 'switch');
56 8         997 feature->import::into($target, 'unicode_strings');
57             # warnings->unimport::out_of($target, 'experimental::refaliasing');
58 8         1013 warnings->unimport::out_of($target, 'experimental::signatures');
59              
60 8 50       1262 if ($PERL_VERSION lt v5.24.0) {
61 8         22 warnings->unimport::out_of($target, 'experimental::postderef');
62             }
63              
64             # For "switch" feature
65 8         1030 warnings->unimport::out_of($target, 'experimental::smartmatch');
66             }
67              
68             1;
69              
70             __END__