Reindeer.pm

filter: Statementstmt 100% 42 / 42 Branchbran 13.6% 3 / 22 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod 0.0% 0 / 1 totaltotal 72.9% 54 / 74 CC 12 SCAR 30.1
CC
12
Cov
70%
init_meta
33.2
BEGIN
1.0
BEGIN
1.0
CRAP 20.3
↑ Summary Reindeer/Builder.pm »
1 #
2 # This file is part of Reindeer
3 #
4 # This software is Copyright (c) 2017, 2015, 2014, 2012, 2011 by Chris Weyl.
5 #
6 # This is free software, licensed under:
7 #
8 # The GNU Lesser General Public License, Version 2.1, February 1999
9 #
10 package Reindeer;
11 13 our $AUTHORITY = 'cpan:RSRCHBOY';
12 # git description: 0.019-4-g42c3ce6
13 13 $Reindeer::VERSION = '0.020';
14  
15 # ABSTRACT: Moose with more antlers
16  
17 13 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 13 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 13 ▶use Reindeer::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 13 ▶use Moose::Exporter 2.1400;
Subroutine BEGIN: called CC=1 SCAR=0.0
22 13 ▶use Import::Into;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 13 ▶use Class::Load;
Subroutine BEGIN: called CC=1 SCAR=0.0
24  
25 13 ▶use MooseX::Traitor 0.002;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 13 ▶use Moose::Util::TypeConstraints ();
Subroutine BEGIN: called CC=1 SCAR=0.0
27  
28 13 my (undef, undef, $init_meta) = Moose::Exporter->build_import_methods(
29 install => [ qw{ import unimport } ],
30  
31 also => [ 'Moose', Reindeer::Util::also_list() ],
32 trait_aliases => [ Reindeer::Util::trait_aliases() ],
33 as_is => [ Reindeer::Util::as_is() ],
34  
35 base_class_roles => [ qw{ MooseX::Traitor } ],
36 );
37  
38 65 ▶sub init_meta {
Subroutine init_meta: called CC=12 SCAR=35.0
Pod undocumented
39 65 my ($class, %options) = @_;
40 65 my $for_class = $options{for_class};
41  
42 # enable features to the level of Perl being used
43 65 ▶ my $features
Branch: 9 branches
BranchTrueFalseTotal
$] >= 5.026 ? : 65 0 65
$] >= 5.024 ? : 0 0 0
$] >= 5.022 ? : 0 0 0
$] >= 5.02 ? : 0 0 0
$] >= 5.018 ? : 0 0 0
$] >= 5.016 ? : 0 0 0
$] >= 5.014 ? : 0 0 0
$] >= 5.012 ? : 0 0 0
$] >= 5.01 ? : 0 0 0
44 = $] >= 5.026 ? ':5.26'
45 : $] >= 5.024 ? ':5.24'
46 : $] >= 5.022 ? ':5.22'
47 : $] >= 5.020 ? ':5.20'
48 : $] >= 5.018 ? ':5.18'
49 : $] >= 5.016 ? ':5.16'
50 : $] >= 5.014 ? ':5.14'
51 : $] >= 5.012 ? ':5.12'
52 : $] >= 5.010 ? ':5.10'
53 : undef
54 ;
55  
56 65 ▶ do { require feature; feature->import($features) }
Branch: 1 branch
BranchTrueFalseTotal
if ($features) 65 0 65
57 if $features;
58  
59 ### $for_class
60 65 Moose->init_meta(for_class => $for_class);
61  
62 ### more properly in import()?
63 65 Reindeer::Util->import_type_libraries({ -into => $for_class });
64 65 Path::Class->export_to_level(1);
65 65 Try::Tiny->import::into(1);
66 65 MooseX::Params::Validate->import({ into => $for_class });
67 65 Moose::Util::TypeConstraints->import(
68 { into => $for_class },
69 qw{ class_type role_type duck_type },
70 );
71 65 MooseX::MarkAsMethods->import({ into => $for_class }, autoclean => 1);
72  
73 65 ▶ goto $init_meta if $init_meta;
Branch: 1 branch
BranchTrueFalseTotal
if $init_meta 65 0 65
74 }
75  
76 13 !!42;
77  
78 __END__
↑ Summary Reindeer/Builder.pm »