LazyInflator/Meta/Role/Method/Constructor.pm

filter: Statementstmt 68.4% 13 / 19 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod n/a totaltotal 61.5% 16 / 26 CC 2 SCAR 10.4
CC
2
Cov
62%
_generate_skip_coercion_and_constraint
6.0
__ANON__
2.0
BEGIN
1.0
CRAP 2.8
« Deflator/Structured.pm ↑ Summary Deflator/Registry.pm »
1 #
2 # This file is part of MooseX-Attribute-Deflator
3 #
4 # This software is Copyright (c) 2012 by Moritz Onken.
5 #
6 # This is free software, licensed under:
7 #
8 # The (three-clause) BSD License
9 #
10 package MooseX::Attribute::LazyInflator::Meta::Role::Method::Constructor;
11 {
12 1 $MooseX::Attribute::LazyInflator::Meta::Role::Method::Constructor::VERSION = '2.2.2';
13 }
14  
15 # ABSTRACT: Lazy inflate attributes
16 1 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 0 ▶override _generate_type_constraint_check => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
21 0 my $self = shift;
22 0 return $self->_generate_skip_coercion_and_constraint($_[0], super);
23 1 };
24  
25 0 ▶sub _generate_skip_coercion_and_constraint {
Subroutine _generate_skip_coercion_and_constraint: not called CC=2 SCAR=17.9
26 0 my ($self, $attr, $code) = @_;
27 0 ▶ if($attr->does('MooseX::Attribute::LazyInflator::Meta::Role::Attribute')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($attr->does("MooseX::Attribute::LazyInflator::Meta::Role::Attribute")) 0 0 0
28 0 return '';
29 }
30 0 return $code;
31 }
32  
33 1 1;
34  
35  
36  
37 =pod
38  
39 =head1 NAME
40  
41 MooseX::Attribute::LazyInflator::Meta::Role::Method::Constructor - Lazy inflate attributes
42  
43 =head1 VERSION
44  
45 version 2.2.2
46  
47 =head1 METHODS
48  
49 =over 8
50  
51 =item override B<_generate_type_constraint_check>
52  
53 =item B<_generate_skip_coercion_and_constraint>
54  
55 Type constraint verification is not processed if the
56 attribute has not been inflated yet.
57  
58 =back
59  
60 =head1 AUTHOR
61  
62 Moritz Onken
63  
64 =head1 COPYRIGHT AND LICENSE
65  
66 This software is Copyright (c) 2012 by Moritz Onken.
67  
68 This is free software, licensed under:
69  
70 The (three-clause) BSD License
71  
72 =cut
73  
74  
75 __END__
« Deflator/Structured.pm ↑ Summary Deflator/Registry.pm »