Class/MakeMethods/Set.pm

filter: Statementstmt 93.8% 261 / 278 Branchbran 70.8% 112 / 158 Conditioncond 61.5% 72 / 117 MC/DCmcdc 33.3% 22 / 66 Subroutinesub 100% 36 / 36 Podpod 100% 2 / 2 totaltotal 76.8% 505 / 657 CC 144 SCAR 26.1
CC
144
Cov
80%
__ANON__
27.0
inherited_set
26.5
inheritable_set
20.4
CRAP 13.6
« Class/MakeMethods/Generic.pm ↑ Summary Object/MakeMethods.pm »
1 package Rose::Class::MakeMethods::Set;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 3 ▶use Carp();
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 our $VERSION = '0.81';
8  
9 3 ▶use Rose::Object::MakeMethods;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 3 our @ISA = qw(Rose::Object::MakeMethods);
11  
12 3 our %Inheritable_Set;
13 # (
14 # some_attr_name =>
15 # {
16 # class1 =>
17 # {
18 # meta => { ... },
19 # cache => { ... },
20 # },
21 # class2 => ...,
22 # ...
23 # },
24 # ...
25 # );
26  
27 sub inheritable_set
28 6 ▶{
Subroutine inheritable_set: called CC=18 SCAR=30.1
Pod documented
29 6 my($class, $name, $args) = @_;
30  
31 6 my %methods;
32  
33 # Interface example:
34 # name: required_html_attr
35 # plural_name: required_html_attrs
36 # list_method: required_html_attrs
37 # hash_method: required_html_attrs_hash
38 # test_method: is_required_html_attr (or html_attr_is_required)
39 # add_method: add_required_html_attr
40 # adds_method: add_required_html_attrs
41 # delete_method: delete_required_html_attr
42 # deletes_method: delete_required_html_attrs
43 # clear_method: clear_required_html_attrs
44  
45 6 ▶ my $plural_name = $args->{'plural_name'} || $name . 's';
Condition50%1/2
$args->{'plural_name'} || $name . 's'
l!l
06
MC/DC0%0/1
$args->{'plural_name'} || $name . 's'
$args->{'plural_name'}
Truth table50%1/2
A
A= $args->{'plural_name'}
Aresult
11
00
46  
47 6 ▶ my $list_method = $args->{'list_method'} || $plural_name;
Condition66%2/3
$args->{'list_method'} || $plural_name
l!l&&r!l&&!r
150
MC/DC0%0/2
$args->{'list_method'} || $plural_name
$args->{'list_method'} $plural_name
Truth table66%2/3
A || B
A= $args->{'list_method'}B= $plural_name
ABresult
1X1
011
000
48 6 ▶ my $hash_method = $args->{'hash_method'} || $plural_name . '_hash';
Condition50%1/2
$args->{'hash_method'} || $plural_name . '_hash'
l!l
06
MC/DC0%0/1
$args->{'hash_method'} || $plural_name . '_hash'
$args->{'hash_method'}
Truth table50%1/2
A
A= $args->{'hash_method'}
Aresult
11
00
49 6 ▶ my $test_method = $args->{'test_method'} || $args->{'test_method'} || 'is_' . $name;
Condition80%4/5
$args->{'test_method'} || $args->{'test_method'} || 'is_' . $name
l!l
24
$args->{"test_method"} or $args->{"test_method"}
l!l&&r!l&&!r
204
MC/DC50%1/2
$args->{'test_method'} || $args->{'test_method'} || 'is_' . $name
$args->{"test_method"} $args->{"test_method"}
Truth table66%2/3
A or B
A= $args->{"test_method"}B= $args->{"test_method"}
ABresult
1X1
011
000
50 6 ▶ my $add_method = $args->{'add_method'} || 'add_' . $name;
Condition100%2/2
$args->{'add_method'} || 'add_' . $name
l!l
24
MC/DC100%1/1
$args->{'add_method'} || 'add_' . $name
$args->{'add_method'}
Truth table100%2/2
A
A= $args->{'add_method'}
Aresult
11
00
51 6 ▶ my $adds_method = $args->{'adds_method'} || $add_method . 's';
Condition100%2/2
$args->{'adds_method'} || $add_method . 's'
l!l
15
MC/DC100%1/1
$args->{'adds_method'} || $add_method . 's'
$args->{'adds_method'}
Truth table100%2/2
A
A= $args->{'adds_method'}
Aresult
11
00
52 6 ▶ my $delete_method = $args->{'delete_method'} || 'delete_' . $name;
Condition100%2/2
$args->{'delete_method'} || 'delete_' . $name
l!l
24
MC/DC100%1/1
$args->{'delete_method'} || 'delete_' . $name
$args->{'delete_method'}
Truth table100%2/2
A
A= $args->{'delete_method'}
Aresult
11
00
53 6 ▶ my $deletes_method = $args->{'deletes_method'} || 'delete_' . $plural_name;
Condition100%2/2
$args->{'deletes_method'} || 'delete_' . $plural_name
l!l
24
MC/DC100%1/1
$args->{'deletes_method'} || 'delete_' . $plural_name
$args->{'deletes_method'}
Truth table100%2/2
A
A= $args->{'deletes_method'}
Aresult
11
00
54 6 ▶ my $clear_method = $args->{'clear_method'} || 'clear_' . $plural_name;
Condition100%2/2
$args->{'clear_method'} || 'clear_' . $plural_name
l!l
24
MC/DC100%1/1
$args->{'clear_method'} || 'clear_' . $plural_name
$args->{'clear_method'}
Truth table100%2/2
A
A= $args->{'clear_method'}
Aresult
11
00
55 6 ▶ my $value_method = $args->{'value_method'} || $name . '_value';
Condition50%1/2
$args->{'value_method'} || $name . '_value'
l!l
06
MC/DC0%0/1
$args->{'value_method'} || $name . '_value'
$args->{'value_method'}
Truth table50%1/2
A
A= $args->{'value_method'}
Aresult
11
00
56  
57 6 ▶ my $interface = $args->{'interface'} || 'all';
Condition50%1/2
$args->{'interface'} || 'all'
l!l
06
MC/DC0%0/1
$args->{'interface'} || 'all'
$args->{'interface'}
Truth table50%1/2
A
A= $args->{'interface'}
Aresult
11
00
58 6 my $add_implies = $args->{'add_implies'};
59 6 my $delete_implies = $args->{'delete_implies'};
60  
61 6 ▶ $add_implies = [ $add_implies ]
Branch: 1 branch
BranchTrueFalseTotal
if defined $add_implies and not ref $add_implies 2 4 6
Condition66%2/3
defined $add_implies and not ref $add_implies
!ll&&!rl&&r
402
MC/DC50%1/2
defined $add_implies and not ref $add_implies
defined $add_implies not ref $add_implies
Truth table66%2/3
A and not(B)
A= defined $add_impliesB= not ref $add_implies
ABresult
0X0
100
111
62 if(defined $add_implies && !ref $add_implies);
63  
64 6 ▶ $delete_implies = [ $delete_implies ]
Branch: 1 branch
BranchTrueFalseTotal
if defined $delete_implies and not ref $delete_implies 0 6 6
Condition33%1/3
defined $delete_implies and not ref $delete_implies
!ll&&!rl&&r
600
MC/DC0%0/2
defined $delete_implies and not ref $delete_implies
defined $delete_implies not ref $delete_implies
Truth table33%1/3
A and not(B)
A= defined $delete_impliesB= not ref $delete_implies
ABresult
0X0
100
111
65 if(defined $delete_implies && !ref $delete_implies);
66  
67 $methods{$test_method} = sub
68 22 ▶ {
Subroutine __ANON__: called CC=4 SCAR=14.0
69 22 ▶ my($class) = ref($_[0]) ? ref(shift) : shift;
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] ? : 0 22 22
70  
71 22 ▶ return 0 unless(defined $_[0]);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_[0] 0 22 22
72  
73 3 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
74 22 ▶ return 1 if(exists $class->$hash_method()->{$_[0]});
Branch: 1 branch
BranchTrueFalseTotal
if exists $class->$hash_method->{$_[0]} 18 4 22
75 4 return 0;
76 6 };
77  
78 $methods{$hash_method} = sub
79 67 ▶ {
Subroutine __ANON__: called CC=10 SCAR=23.1
80 67 ▶ my($class) = ref($_[0]) || $_[0];
Condition33%1/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
0670
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table33%1/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
81  
82 67 ▶ unless(exists $Inheritable_Set{$name}{$class})
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $Rose::Class::MakeMethods::Set::Inheritable_Set{$name}{$class}) 14 53 67
83 {
84 3 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
85  
86 14 my @parents = ($class);
87  
88 14 ▶ while(my $parent = shift(@parents))
Branch: 1 branch
BranchTrueFalseTotal
if (my $parent = shift @parents) 30 14 44
89 {
90 3 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
91 30 foreach my $subclass (@{$parent . '::ISA'})
92 {
93 16 push(@parents, $subclass);
94  
95 16 ▶ if(exists $Inheritable_Set{$name}{$subclass})
Branch: 1 branch
BranchTrueFalseTotal
if (exists $Rose::Class::MakeMethods::Set::Inheritable_Set{$name}{$subclass}) 8 8 16
96 {
97 8 ▶ while(my($k, $v) = each(%{$Inheritable_Set{$name}{$subclass}}))
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %{$Rose::Class::MakeMethods::Set::Inheritable_Set{$name}{$subclass};}) 22 8 30
98 {
99 22 ▶ next if(exists $Inheritable_Set{$name}{$class}{$k});
Branch: 1 branch
BranchTrueFalseTotal
if exists $Rose::Class::MakeMethods::Set::Inheritable_Set{$name}{$class}{$k} 6 16 22
100 16 $Inheritable_Set{$name}{$class}{$k} = $v;
101 }
102 }
103 }
104 }
105 }
106  
107 67 ▶ $Inheritable_Set{$name}{$class} ||= {};
Condition100%2/2
$Rose::Class::MakeMethods::Set::Inheritable_Set{$name}{$class} ||= {}
l!l
598
MC/DC100%1/1
$Rose::Class::MakeMethods::Set::Inheritable_Set{$name}{$class} ||= {}
$Rose::Class::MakeMethods::Set::Inheritable_Set{$name}{$class}
Truth table100%2/2
A
A= $Rose::Class::MakeMethods::Set::Inheritable_Set{$name}{$class}
Aresult
11
00
108 0 return wantarray ? %{$Inheritable_Set{$name}{$class}} :
109 67 ▶ $Inheritable_Set{$name}{$class};
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 67 67
110 6 };
111  
112 $methods{$list_method} = sub
113 14 ▶ {
Subroutine __ANON__: called CC=5 SCAR=21.6
114 14 my($class) = shift;
115  
116 14 ▶ $class = ref $class if(ref $class);
Branch: 1 branch
BranchTrueFalseTotal
if ref $class 0 14 14
117  
118 14 ▶ if(@_)
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 0 14 14
119 {
120 0 $class->$clear_method();
121 0 $class->$adds_method(@_);
122 0 ▶ return unless(defined wantarray);
Branch: 1 branch
BranchTrueFalseTotal
unless defined wantarray 0 0 0
123 }
124  
125 14 return wantarray ? sort keys %{$class->$hash_method()} :
126 0 ▶ [ sort keys %{$class->$hash_method()} ];
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 14 0 14
127 6 };
128  
129 6 ▶ $methods{$add_method} = sub { shift->$adds_method(@_) };
Subroutine __ANON__: called CC=1 SCAR=0.0
130  
131 $methods{$adds_method} = sub
132 9 ▶ {
Subroutine __ANON__: called CC=11 SCAR=24.3
133 9 ▶ my($class) = ref($_[0]) ? ref(shift) : shift;
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] ? : 0 9 9
134 9 ▶ Carp::croak("Missing value(s) to add") unless(@_);
Branch: 1 branch
BranchTrueFalseTotal
unless @_ 0 9 9
135  
136 9 my $count = 0;
137 9 my $req_hash = $class->$hash_method();
138  
139 9 ▶ return 0 unless(defined $_[0]);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_[0] 2 7 9
140  
141 7 my %attrs;
142  
143 7 foreach my $arg (grep { defined } @_)
144 {
145 13 ▶ if(ref $arg eq 'HASH')
Branch: 1 branch
BranchTrueFalseTotal
if (ref $arg eq 'HASH') { } 0 13 13
146 {
147 0 $attrs{$_} = $arg->{$_} for(keys %$arg);
148 }
149 else
150 {
151 13 $attrs{$arg} = undef;
152 }
153 }
154  
155 7 ▶ while(my($attr, $val) = each(%attrs))
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %attrs) 13 7 20
156 {
157 3 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
158 13 ▶ next unless(defined $attr);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $attr 0 13 13
159 13 $req_hash->{$attr} = $val;
160  
161 13 ▶ if($add_implies)
Branch: 1 branch
BranchTrueFalseTotal
if ($add_implies) 6 7 13
162 {
163 6 foreach my $method (@$add_implies)
164 {
165 6 $class->$method($attr);
166 }
167 }
168  
169 13 $count++;
170 }
171  
172 7 return $count;
173 6 };
174  
175 $methods{$clear_method} = sub
176 4 ▶ {
Subroutine __ANON__: called CC=3 SCAR=11.0
177 4 ▶ my($class) = ref($_[0]) ? ref(shift) : shift;
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] ? : 0 4 4
178 4 my @values = $class->$list_method();
179 4 ▶ return unless(@values);
Branch: 1 branch
BranchTrueFalseTotal
unless @values 2 2 4
180 2 $class->$deletes_method(@values);
181 6 };
182  
183 6 ▶ $methods{$delete_method} = sub { shift->$deletes_method(@_) };
Subroutine __ANON__: called CC=1 SCAR=0.0
184  
185 $methods{$deletes_method} = sub
186 4 ▶ {
Subroutine __ANON__: called CC=8 SCAR=22.2
187 4 ▶ my($class) = ref($_[0]) ? ref(shift) : shift;
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] ? : 0 4 4
188 4 ▶ Carp::croak("Missing value(s) to delete") unless(@_);
Branch: 1 branch
BranchTrueFalseTotal
unless @_ 0 4 4
189  
190 4 my $count = 0;
191 4 my $req_hash = $class->$hash_method();
192  
193 4 foreach my $attr (@_)
194 {
195 3 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
196 6 ▶ next unless(defined $attr);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $attr 0 6 6
197 6 ▶ next unless(exists $req_hash->{$attr});
Branch: 1 branch
BranchTrueFalseTotal
unless exists $req_hash->{$attr} 0 6 6
198 6 delete $req_hash->{$attr};
199 6 $count++;
200  
201 6 ▶ if($delete_implies)
Branch: 1 branch
BranchTrueFalseTotal
if ($delete_implies) 0 6 6
202 {
203 0 foreach my $method (@$delete_implies)
204 {
205 0 $class->$method($attr);
206 }
207 }
208 }
209  
210 4 return $count;
211 6 };
212  
213 $methods{$value_method} = sub
214 18 ▶ {
Subroutine __ANON__: called CC=5 SCAR=16.5
215 18 ▶ my($class) = ref($_[0]) || $_[0];
Condition33%1/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
0180
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table33%1/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
216  
217 18 my $hash = $class->$hash_method();
218 18 ▶ return undef unless($_[1] && exists $hash->{$_[1]});
Branch: 1 branch
BranchTrueFalseTotal
unless $_[1] and exists $$hash{$_[1]} 10 8 18
Condition66%2/3
$_[1] and exists $$hash{$_[1]}
!ll&&!rl&&r
0108
MC/DC50%1/2
$_[1] and exists $$hash{$_[1]}
$_[1] exists $$hash{$_[1]}
Truth table66%2/3
A and B
A= $_[1]B= exists $$hash{$_[1]}
ABresult
0X0
100
111
219 8 ▶ return $hash->{$_[1]} = $_[2] if(@_ > 2);
Branch: 1 branch
BranchTrueFalseTotal
if @_ > 2 5 3 8
220 3 return $hash->{$_[1]};
221 6 };
222  
223 6 ▶ if($interface ne 'all')
Branch: 1 branch
BranchTrueFalseTotal
if ($interface ne "all") 0 6 6
224 {
225 0 Carp::croak "Unknown interface: $interface";
226 }
227  
228 6 return \%methods;
229 }
230  
231 3 ▶use constant CLASS_VALUE => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
232 3 ▶use constant INHERITED_VALUE => 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
233 3 ▶use constant DELETED_VALUE => 3;
Subroutine BEGIN: called CC=1 SCAR=0.0
234  
235 3 our %Inherited_Set;
236 # (
237 # some_attr_name =>
238 # {
239 # class1 =>
240 # {
241 # meta => { ... },
242 # cache => { ... },
243 # },
244 # class2 => ...,
245 # ...
246 # },
247 # ...
248 # );
249  
250 sub inherited_set
251 4 ▶{
Subroutine inherited_set: called CC=22 SCAR=32.8
Pod documented
252 4 my($class, $name, $args) = @_;
253  
254 4 my %methods;
255  
256 # Interface example:
257 # name: valid_html_attr
258 # plural_name: valid_html_attrs
259 # list_method: valid_html_attrs
260 # cache_method: valid_html_attrs_cache
261 # hash_method: valid_html_attrs_hash
262 # test_method: is_valid_html_attr (or html_attr_is_valid)
263 # add_method: add_valid_html_attr
264 # adds_method: add_valid_html_attrs
265 # delete_method: delete_valid_html_attr
266 # deletes_method: delete_valid_html_attrs
267 # clear_method clear_valid_html_attrs
268 # inherit_method: inherit_valid_html_attr
269 # inherits_method: inherit_valid_html_attrs
270  
271 4 ▶ my $plural_name = $args->{'plural_name'} || $name . 's';
Condition50%1/2
$args->{'plural_name'} || $name . 's'
l!l
04
MC/DC0%0/1
$args->{'plural_name'} || $name . 's'
$args->{'plural_name'}
Truth table50%1/2
A
A= $args->{'plural_name'}
Aresult
11
00
272  
273 4 ▶ my $list_method = $args->{'list_method'} || $plural_name;
Condition33%1/3
$args->{'list_method'} || $plural_name
l!l&&r!l&&!r
040
MC/DC0%0/2
$args->{'list_method'} || $plural_name
$args->{'list_method'} $plural_name
Truth table33%1/3
A || B
A= $args->{'list_method'}B= $plural_name
ABresult
1X1
011
000
274 4 ▶ my $cache_method = $args->{'cache_method'} || $plural_name . '_cache';
Condition50%1/2
$args->{'cache_method'} || $plural_name . '_cache'
l!l
04
MC/DC0%0/1
$args->{'cache_method'} || $plural_name . '_cache'
$args->{'cache_method'}
Truth table50%1/2
A
A= $args->{'cache_method'}
Aresult
11
00
275 4 ▶ my $hash_method = $args->{'hash_method'} || $plural_name . '_hash';
Condition50%1/2
$args->{'hash_method'} || $plural_name . '_hash'
l!l
04
MC/DC0%0/1
$args->{'hash_method'} || $plural_name . '_hash'
$args->{'hash_method'}
Truth table50%1/2
A
A= $args->{'hash_method'}
Aresult
11
00
276 4 ▶ my $test_method = $args->{'test_method'} || $args->{'test_method'} || 'is_' . $name;
Condition40%2/5
$args->{'test_method'} || $args->{'test_method'} || 'is_' . $name
l!l
40
$args->{"test_method"} or $args->{"test_method"}
l!l&&r!l&&!r
400
MC/DC0%0/2
$args->{'test_method'} || $args->{'test_method'} || 'is_' . $name
$args->{"test_method"} $args->{"test_method"}
Truth table33%1/3
A or B
A= $args->{"test_method"}B= $args->{"test_method"}
ABresult
1X1
011
000
277 4 ▶ my $add_method = $args->{'add_method'} || 'add_' . $name;
Condition50%1/2
$args->{'add_method'} || 'add_' . $name
l!l
04
MC/DC0%0/1
$args->{'add_method'} || 'add_' . $name
$args->{'add_method'}
Truth table50%1/2
A
A= $args->{'add_method'}
Aresult
11
00
278 4 ▶ my $adds_method = $args->{'adds_method'} || $add_method . 's';
Condition50%1/2
$args->{'adds_method'} || $add_method . 's'
l!l
04
MC/DC0%0/1
$args->{'adds_method'} || $add_method . 's'
$args->{'adds_method'}
Truth table50%1/2
A
A= $args->{'adds_method'}
Aresult
11
00
279 4 ▶ my $delete_method = $args->{'delete_method'} || 'delete_' . $name;
Condition50%1/2
$args->{'delete_method'} || 'delete_' . $name
l!l
04
MC/DC0%0/1
$args->{'delete_method'} || 'delete_' . $name
$args->{'delete_method'}
Truth table50%1/2
A
A= $args->{'delete_method'}
Aresult
11
00
280 4 ▶ my $deletes_method = $args->{'deletes_method'} || 'delete_' . $plural_name;
Condition50%1/2
$args->{'deletes_method'} || 'delete_' . $plural_name
l!l
04
MC/DC0%0/1
$args->{'deletes_method'} || 'delete_' . $plural_name
$args->{'deletes_method'}
Truth table50%1/2
A
A= $args->{'deletes_method'}
Aresult
11
00
281 4 ▶ my $clear_method = $args->{'clear_method'} || 'clear_' . $plural_name;
Condition50%1/2
$args->{'clear_method'} || 'clear_' . $plural_name
l!l
04
MC/DC0%0/1
$args->{'clear_method'} || 'clear_' . $plural_name
$args->{'clear_method'}
Truth table50%1/2
A
A= $args->{'clear_method'}
Aresult
11
00
282 4 ▶ my $inherit_method = $args->{'inherit_method'} || 'inherit_' . $name;
Condition50%1/2
$args->{'inherit_method'} || 'inherit_' . $name
l!l
04
MC/DC0%0/1
$args->{'inherit_method'} || 'inherit_' . $name
$args->{'inherit_method'}
Truth table50%1/2
A
A= $args->{'inherit_method'}
Aresult
11
00
283 4 ▶ my $inherits_method = $args->{'inherits_method'} || $inherit_method . 's';
Condition50%1/2
$args->{'inherits_method'} || $inherit_method . 's'
l!l
04
MC/DC0%0/1
$args->{'inherits_method'} || $inherit_method . 's'
$args->{'inherits_method'}
Truth table50%1/2
A
A= $args->{'inherits_method'}
Aresult
11
00
284  
285 4 ▶ my $interface = $args->{'interface'} || 'all';
Condition50%1/2
$args->{'interface'} || 'all'
l!l
04
MC/DC0%0/1
$args->{'interface'} || 'all'
$args->{'interface'}
Truth table50%1/2
A
A= $args->{'interface'}
Aresult
11
00
286  
287 4 my $add_implies = $args->{'add_implies'};
288 4 my $delete_implies = $args->{'delete_implies'};
289 4 my $inherit_implies = $args->{'inherit_implies'};
290  
291 4 ▶ $add_implies = [ $add_implies ]
Branch: 1 branch
BranchTrueFalseTotal
if defined $add_implies and not ref $add_implies 2 2 4
Condition66%2/3
defined $add_implies and not ref $add_implies
!ll&&!rl&&r
202
MC/DC50%1/2
defined $add_implies and not ref $add_implies
defined $add_implies not ref $add_implies
Truth table66%2/3
A and not(B)
A= defined $add_impliesB= not ref $add_implies
ABresult
0X0
100
111
292 if(defined $add_implies && !ref $add_implies);
293  
294 4 ▶ $delete_implies = [ $delete_implies ]
Branch: 1 branch
BranchTrueFalseTotal
if defined $delete_implies and not ref $delete_implies 2 2 4
Condition66%2/3
defined $delete_implies and not ref $delete_implies
!ll&&!rl&&r
202
MC/DC50%1/2
defined $delete_implies and not ref $delete_implies
defined $delete_implies not ref $delete_implies
Truth table66%2/3
A and not(B)
A= defined $delete_impliesB= not ref $delete_implies
ABresult
0X0
100
111
295 if(defined $delete_implies && !ref $delete_implies);
296  
297 4 ▶ $inherit_implies = [ $inherit_implies ]
Branch: 1 branch
BranchTrueFalseTotal
if defined $inherit_implies and not ref $inherit_implies 2 2 4
Condition66%2/3
defined $inherit_implies and not ref $inherit_implies
!ll&&!rl&&r
202
MC/DC50%1/2
defined $inherit_implies and not ref $inherit_implies
defined $inherit_implies not ref $inherit_implies
Truth table66%2/3
A and not(B)
A= defined $inherit_impliesB= not ref $inherit_implies
ABresult
0X0
100
111
298 if(defined $inherit_implies && !ref $inherit_implies);
299  
300 $methods{$cache_method} = sub
301 200 ▶ {
Subroutine __ANON__: called CC=19 SCAR=33.0
302 200 ▶ my($class) = ref($_[0]) || $_[0];
Condition33%1/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
02000
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table33%1/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
303  
304 200 ▶ if($Inherited_Set{$name}{$class}{'meta'}{'cache_is_valid'})
Branch: 1 branch
BranchTrueFalseTotal
if ($Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"meta"}{"cache_is_valid"}) 112 88 200
305 {
306 return
307 8 ▶ wantarray ? (%{$Inherited_Set{$name}{$class}{'cache'} ||= {}}) :
Condition50%2/4
$Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"} ||= {}
l!l
80
$Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"} ||= {}
l!l
1040
MC/DC0%0/1
$Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"} ||= {}
$Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}
MC/DC0%0/1
$Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"} ||= {}
$Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}
Truth table50%1/2
A
A= $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}
Aresult
11
00
Truth table50%1/2
A
A= $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}
Aresult
11
00
308 112 ▶ ($Inherited_Set{$name}{$class}{'cache'} ||= {});
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 8 104 112
309 }
310  
311 88 my @parents = ($class);
312  
313 88 ▶ while(my $parent = shift(@parents))
Branch: 1 branch
BranchTrueFalseTotal
if (my $parent = shift @parents) 194 88 282
314 {
315 3 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
316 194 foreach my $subclass (@{$parent . '::ISA'})
317 {
318 106 push(@parents, $subclass);
319  
320 106 ▶ if($subclass->can($cache_method))
Branch: 2 branches
BranchTrueFalseTotal
if ($subclass->can($cache_method)) { } 106 0 106
elsif ($subclass->can($list_method)) { } 0 0 0
321 {
322 106 my $cache = $subclass->$cache_method();
323  
324 106 ▶ while(my($attr, $val) = each %$cache)
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %$cache) 440 106 546
325 {
326 440 ▶ next if($val == DELETED_VALUE);
Branch: 1 branch
BranchTrueFalseTotal
if $val == 3 172 268 440
327 $Inherited_Set{$name}{$class}{'cache'}{$attr} = INHERITED_VALUE
328 268 ▶ unless(exists $Inherited_Set{$name}{$class}{'cache'}{$attr});
Branch: 1 branch
BranchTrueFalseTotal
unless exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} 84 184 268
329 }
330 }
331 # Slower method for subclasses that don't want to implement the
332 # cache method (which is not strictly part of the public API)
333 elsif($subclass->can($list_method))
334 {
335 0 foreach my $attr ($subclass->$list_method())
336 {
337 $Inherited_Set{$name}{$class}{'cache'}{$attr} = INHERITED_VALUE
338 0 ▶ unless(exists $Inherited_Set{$name}{$class}{'cache'}{$attr});
Branch: 1 branch
BranchTrueFalseTotal
unless exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} 0 0 0
339 }
340 }
341 }
342 }
343  
344 88 $Inherited_Set{$name}{$class}{'meta'}{'cache_is_valid'} = 1;
345  
346 88 my $want = wantarray;
347  
348 88 ▶ return unless(defined $want);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $want 6 82 88
349 0 ▶ $want ? (%{$Inherited_Set{$name}{$class}{'cache'} ||= {}}) :
Condition25%1/4
$Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"} ||= {}
l!l
00
$Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"} ||= {}
l!l
820
MC/DC0%0/1
$Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"} ||= {}
$Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}
MC/DC0%0/1
$Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"} ||= {}
$Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}
Truth table0%0/2
A
A= $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}
Aresult
11
00
Truth table50%1/2
A
A= $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}
Aresult
11
00
350 82 ▶ ($Inherited_Set{$name}{$class}{'cache'} ||= {});
Branch: 1 branch
BranchTrueFalseTotal
$want ? : 0 82 82
351 4 };
352  
353 $methods{$hash_method} = sub
354 8 ▶ {
Subroutine __ANON__: called CC=5 SCAR=16.6
355 8 ▶ my($class) = ref($_[0]) || $_[0];
Condition33%1/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
080
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table33%1/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
356  
357 8 my %hash = $class->$cache_method();
358  
359 8 ▶ while(my($k, $v) = each %hash)
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %hash) 36 8 44
360 {
361 36 ▶ delete $hash{$k} if($v == DELETED_VALUE);
Branch: 1 branch
BranchTrueFalseTotal
if $v == 3 16 20 36
362 }
363  
364 8 ▶ return wantarray ? %hash : \%hash;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 8 8
365 4 };
366  
367 $methods{$list_method} = sub
368 8 ▶ {
Subroutine __ANON__: called CC=5 SCAR=21.6
369 8 my($class) = shift;
370  
371 8 ▶ $class = ref $class if(ref $class);
Branch: 1 branch
BranchTrueFalseTotal
if ref $class 0 8 8
372  
373 8 ▶ if(@_)
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 0 8 8
374 {
375 0 $class->$clear_method();
376 0 $class->$adds_method(@_);
377 0 ▶ return unless(defined wantarray);
Branch: 1 branch
BranchTrueFalseTotal
unless defined wantarray 0 0 0
378 }
379  
380 8 return wantarray ? sort keys %{$class->$hash_method()} :
381 0 ▶ [ sort keys %{$class->$hash_method()} ];
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 8 0 8
382 4 };
383  
384 $methods{$test_method} = sub
385 304 ▶ {
Subroutine __ANON__: called CC=8 SCAR=21.0
386 304 ▶ my($class) = ref($_[0]) ? ref(shift) : shift;
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] ? : 0 304 304
387 304 ▶ return 0 unless(defined $_[0]);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_[0] 0 304 304
388  
389 304 ▶ if($Inherited_Set{$name}{$class}{'meta'}{'cache_is_valid'})
Branch: 1 branch
BranchTrueFalseTotal
if ($Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"meta"}{"cache_is_valid"}) 224 80 304
390 {
391 return (exists $Inherited_Set{$name}{$class}{'cache'}{$_[0]} &&
392 224 ▶ $Inherited_Set{$name}{$class}{'cache'}{$_[0]} != DELETED_VALUE) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{'cache'}{$_[0]} && $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{'cache'}{$_[0]} != 3 ? : 158 66 224
Condition100%3/3
exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$_[0]} and $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$_[0]} != 3
!ll&&!rl&&r
858158
MC/DC100%2/2
exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$_[0]} and $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$_[0]} != 3
exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$_[0]} $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$_[0]} != 3
Truth table100%3/3
A and B
A= exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$_[0]}B= $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$_[0]} != 3
ABresult
0X0
100
111
393 }
394  
395 80 my $cache = $class->$cache_method();
396  
397 80 ▶ return (exists $cache->{$_[0]} && $cache->{$_[0]} != DELETED_VALUE) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
exists $$cache{$_[0]} && $$cache{$_[0]} != 3 ? : 72 8 80
Condition66%2/3
exists $$cache{$_[0]} and $$cache{$_[0]} != 3
!ll&&!rl&&r
8072
MC/DC50%1/2
exists $$cache{$_[0]} and $$cache{$_[0]} != 3
exists $$cache{$_[0]} $$cache{$_[0]} != 3
Truth table66%2/3
A and B
A= exists $$cache{$_[0]}B= $$cache{$_[0]} != 3
ABresult
0X0
100
111
398 4 };
399  
400 4 ▶ $methods{$add_method} = sub { shift->$adds_method(@_) };
Subroutine __ANON__: called CC=1 SCAR=0.0
401  
402 $methods{$adds_method} = sub
403 62 ▶ {
Subroutine __ANON__: called CC=11 SCAR=24.2
404 62 ▶ my($class) = ref($_[0]) ? ref(shift) : shift;
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] ? : 0 62 62
405 62 ▶ Carp::croak("Missing value(s) to add") unless(@_);
Branch: 1 branch
BranchTrueFalseTotal
unless @_ 0 62 62
406  
407 62 my $count = 0;
408  
409 62 foreach my $attr (@_)
410 {
411 3 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
412 70 ▶ next unless(defined $attr);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $attr 0 70 70
413 70 $Inherited_Set{$name}{$class}{'cache'}{$attr} = CLASS_VALUE;
414  
415 70 ▶ if($add_implies)
Branch: 1 branch
BranchTrueFalseTotal
if ($add_implies) 22 48 70
416 {
417 22 foreach my $method (@$add_implies)
418 {
419 22 $class->$method($attr);
420 }
421 }
422  
423 70 $count++;
424 }
425  
426 # _invalidate_inherited_set_caches($class, $name) if($count);
427 # Inlined since it is private and only called once
428 62 ▶ if($count)
Branch: 1 branch
BranchTrueFalseTotal
if ($count) 62 0 62
429 {
430 62 foreach my $test_class (keys %{$Inherited_Set{$name}})
431 {
432 222 ▶ if($test_class->isa($class) && $test_class ne $class)
Branch: 1 branch
BranchTrueFalseTotal
if ($test_class->isa($class) and $test_class ne $class) 96 126 222
Condition100%3/3
$test_class->isa($class) and $test_class ne $class
!ll&&!rl&&r
646296
MC/DC100%2/2
$test_class->isa($class) and $test_class ne $class
$test_class->isa($class) $test_class ne $class
Truth table100%3/3
A and B
A= $test_class->isa($class)B= $test_class ne $class
ABresult
0X0
100
111
433 {
434 96 $Inherited_Set{$name}{$test_class}{'meta'}{'cache_is_valid'} = 0;
435 }
436 }
437 }
438  
439 62 return $count;
440 4 };
441  
442 $methods{$clear_method} = sub
443 2 ▶ {
Subroutine __ANON__: called CC=3 SCAR=11.4
444 2 ▶ my($class) = ref($_[0]) ? ref(shift) : shift;
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] ? : 0 2 2
445 2 my @values = $class->$list_method();
446 2 ▶ return unless(@values);
Branch: 1 branch
BranchTrueFalseTotal
unless @values 0 2 2
447 2 $class->$deletes_method(@values);
448 4 };
449  
450 4 ▶ $methods{$delete_method} = sub { shift->$deletes_method(@_) };
Subroutine __ANON__: called CC=1 SCAR=0.0
451  
452 $methods{$deletes_method} = sub
453 60 ▶ {
Subroutine __ANON__: called CC=15 SCAR=27.2
454 60 ▶ my($class) = ref($_[0]) ? ref(shift) : shift;
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] ? : 0 60 60
455 60 ▶ Carp::croak("Missing value(s) to delete") unless(@_);
Branch: 1 branch
BranchTrueFalseTotal
unless @_ 0 60 60
456  
457 # Init set if it doesn't exist
458 60 ▶ unless(exists $Inherited_Set{$name}{$class})
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}) 6 54 60
459 {
460 6 $class->$cache_method();
461 }
462  
463 60 my $count = 0;
464  
465 60 foreach my $attr (@_)
466 {
467 3 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
468 66 ▶ next unless(defined $attr);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $attr 0 66 66
469  
470 66 ▶ if(exists $Inherited_Set{$name}{$class}{'cache'}{$attr} &&
Branch: 1 branch
BranchTrueFalseTotal
if (exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} and $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} != 3) 44 22 66
Condition66%2/3
exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} and $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} != 3
!ll&&!rl&&r
22044
MC/DC50%1/2
exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} and $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} != 3
exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} != 3
Truth table66%2/3
A and B
A= exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr}B= $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} != 3
ABresult
0X0
100
111
471 $Inherited_Set{$name}{$class}{'cache'}{$attr} != DELETED_VALUE)
472 {
473 44 $Inherited_Set{$name}{$class}{'cache'}{$attr} = DELETED_VALUE;
474 44 $count++;
475  
476 44 ▶ if($delete_implies)
Branch: 1 branch
BranchTrueFalseTotal
if ($delete_implies) 26 18 44
477 {
478 26 foreach my $method (@$delete_implies)
479 {
480 26 $class->$method($attr);
481 }
482 }
483  
484 44 foreach my $test_class (keys %{$Inherited_Set{$name}})
485 {
486 172 ▶ next if($class eq $test_class);
Branch: 1 branch
BranchTrueFalseTotal
if $class eq $test_class 44 128 172
487  
488 128 ▶ if($test_class->isa($class) && exists $Inherited_Set{$name}{$test_class}{'cache'}{$attr} &&
Branch: 1 branch
BranchTrueFalseTotal
if ($test_class->isa($class) and exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$test_class}{"cache"}{$attr} and $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$test_class}{"cache"}{$attr} == 2) 40 88 128
Condition100%6/6
$test_class->isa($class) and exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$test_class}{"cache"}{$attr} and $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$test_class}{"cache"}{$attr} == 2
!ll&&!rl&&r
682040
$test_class->isa($class) and exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$test_class}{"cache"}{$attr}
!ll&&!rl&&r
62660
MC/DC100%3/3
$test_class->isa($class) and exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$test_class}{"cache"}{$attr} and $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$test_class}{"cache"}{$attr} == 2
$test_class->isa($class) exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$test_class}{"cache"}{$attr} $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$test_class}{"cache"}{$attr} == 2
Truth table100%4/4
A and B and C
A= $test_class->isa($class)B= exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$test_class}{"cache"}{$attr}C= $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$test_class}{"cache"}{$attr} == 2
ABCresult
0XX0
10X0
1100
1111
489 $Inherited_Set{$name}{$test_class}{'cache'}{$attr} == INHERITED_VALUE)
490 {
491 40 delete $Inherited_Set{$name}{$test_class}{'cache'}{$attr};
492 40 $Inherited_Set{$name}{$test_class}{'meta'}{'cache_is_valid'} = 0;
493 }
494 }
495 }
496 }
497  
498 # Not required
499 #_invalidate_inherited_set_caches($class, $name) if($count);
500  
501 60 return $count;
502 4 };
503  
504 4 ▶ $methods{$inherit_method} = sub { shift->$inherits_method(@_) };
Subroutine __ANON__: called CC=1 SCAR=0.0
505  
506 $methods{$inherits_method} = sub
507 10 ▶ {
Subroutine __ANON__: called CC=8 SCAR=21.0
508 10 ▶ my($class) = ref($_[0]) ? ref(shift) : shift;
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] ? : 0 10 10
509 10 ▶ Carp::croak("Missing value(s) to inherit") unless(@_);
Branch: 1 branch
BranchTrueFalseTotal
unless @_ 0 10 10
510  
511 10 my $count = 0;
512  
513 10 foreach my $attr (@_)
514 {
515 10 ▶ if(exists $Inherited_Set{$name}{$class}{'cache'}{$attr} &&
Branch: 1 branch
BranchTrueFalseTotal
if (exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} and $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} == 3) 8 2 10
Condition66%2/3
exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} and $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} == 3
!ll&&!rl&&r
208
MC/DC50%1/2
exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} and $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} == 3
exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} == 3
Truth table66%2/3
A and B
A= exists $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr}B= $Rose::Class::MakeMethods::Set::Inherited_Set{$name}{$class}{"cache"}{$attr} == 3
ABresult
0X0
100
111
516 $Inherited_Set{$name}{$class}{'cache'}{$attr} == DELETED_VALUE)
517 {
518 8 delete $Inherited_Set{$name}{$class}{'cache'}{$attr};
519 8 $Inherited_Set{$name}{$class}{'meta'}{'cache_is_valid'} = 0;
520 8 $count++;
521 }
522  
523 10 ▶ if($inherit_implies)
Branch: 1 branch
BranchTrueFalseTotal
if ($inherit_implies) 4 6 10
524 {
525 4 foreach my $method (@$inherit_implies)
526 {
527 4 $class->$method($attr);
528 }
529 }
530 }
531  
532 10 return $count;
533 4 };
534  
535 4 ▶ if($interface ne 'all')
Branch: 1 branch
BranchTrueFalseTotal
if ($interface ne "all") 0 4 4
536 {
537 0 Carp::croak "Unknown interface: $interface";
538 }
539  
540 4 return \%methods;
541 }
542  
543 # Inlined above since it is private and only called once
544 # sub _invalidate_inherited_set_caches
545 # {
546 # my($class, $name) = @_;
547 #
548 # foreach my $test_class (keys %{$Inherited_Set{$name}})
549 # {
550 # if($test_class->isa($class) && $test_class ne $class)
551 # {
552 # $Inherited_Set{$name}{$test_class}{'meta'}{'cache_is_valid'} = 0;
553 # }
554 # }
555 # }
556  
557 3 1;
558  
559 __END__
« Class/MakeMethods/Generic.pm ↑ Summary Object/MakeMethods.pm »