File Coverage

lib/Range/Merge/Boilerplate.pm
Criterion Covered Total %
statement 44 57 77.1
branch 4 8 50.0
condition n/a
subroutine 9 9 100.0
pod n/a
total 57 74 77.0


line stmt bran cond sub pod time code
1             #
2             # Copyright (C) 2015-2019 Joelle Maslak
3             # All Rights Reserved - See License
4             #
5              
6             package Range::Merge::Boilerplate;
7             # ABSTRACT: Generic Boilerplate (copied from JTM::Bootstrap)
8             $Range::Merge::Boilerplate::VERSION = '2.253531';
9              
10 8     8   1387331 use v5.22;
  8         31  
11 8     8   60 use strict;
  8         18  
  8         278  
12 8     8   38 use warnings;
  8         16  
  8         524  
13              
14 8     8   60 use feature 'signatures';
  8         17  
  8         1514  
15 8     8   57 no warnings 'experimental::signatures';
  8         63  
  8         348  
16              
17 8     8   4668 use English;
  8         25023  
  8         43  
18 8     8   7984 use Import::Into;
  8         25856  
  8         345  
19 8     8   4933 use Smart::Comments;
  8         277442  
  8         62  
20              
21 16     16   916 sub import($self, $type='script') {
  16         39  
  16         43  
  16         28  
22 16 50       136 ### assert: ($type =~ m/^(?:class|role|script)$/ms)
  0         0  
  0         0  
  0         0  
  0         0  
23              
24 16         52 my $target = caller;
25              
26 16         136 strict->import::into($target);
27 16         4352 warnings->import::into($target);
28 16         3691 autodie->import::into($target);
29              
30 16         262821 feature->import::into($target, ':5.22');
31              
32 16         6890 utf8->import::into($target); # Allow UTF-8 Source
33              
34 16 50       6024 if ($type eq 'class') {
    50          
35 0         0 Moose->import::into($target);
36 0         0 Moose::Util::TypeConstraints->import::into($target);
37 0         0 MooseX::StrictConstructor->import::into($target);
38 0         0 namespace::autoclean->import::into($target);
39             } elsif ($type eq 'role') {
40 0         0 Moose::Role->import::into($target);
41 0         0 Moose::Util::TypeConstraints->import::into($target);
42 0         0 MooseX::StrictConstructor->import::into($target);
43 0         0 namespace::autoclean->import::into($target);
44             }
45              
46 16         105 Carp->import::into($target);
47 16         4436 English->import::into($target);
48 16         10025 Smart::Comments->import::into($target, '-ENV', '###');
49              
50 16         5224 feature->import::into($target, 'postderef'); # Not needed if feature budle >= 5.23.1
51              
52             # We haven't been using this
53             # feature->import::into($target, 'refaliasing');
54 16         7249 feature->import::into($target, 'signatures');
55              
56 16         3828 feature->import::into($target, 'unicode_strings');
57             # warnings->unimport::out_of($target, 'experimental::refaliasing');
58 16         3745 warnings->unimport::out_of($target, 'experimental::signatures');
59              
60 16 50       4588 if ($PERL_VERSION lt v5.24.0) {
61 0         0 warnings->unimport::out_of($target, 'experimental::postderef');
62             }
63              
64 16         385 return;
65             }
66              
67             1;
68              
69             __END__