Monjon.pm

filter: Statementstmt 96.9% 32 / 33 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod n/a totaltotal 95.6% 44 / 46 CC 2 SCAR 1.8
CC
2
Cov
95%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Method/Generate/Accessor/Role/Monjon.pm ↑ Summary
1 2 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use Moo ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use Moo::Role ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use Import::Into ();
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 package Monjon;
11  
12 2 our $AUTHORITY = 'cpan:TOBYINK';
13 2 our $VERSION = '0.004';
14 2 our @ISA = qw( Moo );
15  
16 0 ▶do { require UNIVERSAL::DOES }
Branch: 1 branch
BranchTrueFalseTotal
if ($] < "5.01") 0 2 2
17 if $] < 5.010000;
18  
19 3 ▶sub import {
Subroutine import: called CC=1 SCAR=0.0
20 3 my $class = shift;
21 3 my $caller = caller;
22
23 3 'Moo'->import::into($caller, @_);
24
25 3 'Moo::Role'->apply_roles_to_object(
26 'Moo'->_accessor_maker_for($caller),
27 'Method::Generate::Accessor::Role::Monjon',
28 );
29
30 3 'Moo::Role'->apply_roles_to_object(
31 'Moo'->_constructor_maker_for($caller),
32 'Method::Generate::Constructor::Role::Monjon',
33 );
34
35 $caller->Class::Method::Modifiers::install_modifier(
36 before => 'has',
37 6 ▶ sub {
Subroutine __ANON__: called CC=2 SCAR=6.9
38 6 ▶ $Monjon::INSTANCES_EXIST{$caller}
Branch: 1 branch
BranchTrueFalseTotal
$Monjon::INSTANCES_EXIST{$caller} and Carp::croak("$caller has already been instantiated; cannot add attributes") 1 5 6
39 and Carp::croak("$caller has already been instantiated; cannot add attributes");
40 },
41 3 );
42 }
43  
44 2 __PACKAGE__
45 __END__
« Method/Generate/Accessor/Role/Monjon.pm ↑ Summary