Branch Coverage

blib/lib/Class/MethodVars.pm
Criterion Covered Total %
branch 18 202 8.9


line true false branch
54 0 1 if ($Configs{$package})
63 0 0 if ($cpos == 1 and ref $cmd) { }
0 0 elsif ($cmd eq '-this') { }
0 0 elsif ($cmd eq '-class') { }
0 0 elsif ($cpos == 1 and not $cmd =~ /^[\+-]/) { }
0 0 elsif ($cmd eq '-fields' or $cmd eq '-field') { }
0 0 elsif ($cmd =~ /^-(r[wo]|wo|hidden)fields?$/) { }
0 0 elsif ($cmd eq '-fieldvarprefix') { }
0 0 elsif ($cmd eq '-fieldhatprefix') { }
0 0 elsif ($cmd =~ /^([+-])(.*)$/ and $OptionsMap{$2}) { }
75 0 0 if (@_ and ref $_[0]) { }
84 0 0 if (@_ and ref $_[0]) { }
97 0 0 if ($toggle eq '-' and @_ and $_[0] =~ /^(?:[10]|ON|OFF|TRUE|FALSE)$/i)
111 0 1 if (@bad_field_names)
113 0 0 if (eval { do { require Lingua::EN::Inflect; 1 } }) { }
121 0 1 if $$Config{'this'} =~ /^\$?_$/
122 0 1 if $$Config{'class'} =~ /^\$?_$/
124 1 0 if $$Config{'options'}{'subthis'}
125 1 0 if $$Config{'options'}{'subclass'}
127 0 1 if $$Config{'options'}{'varthis'}
128 0 1 if $$Config{'options'}{'varclass'}
129 0 1 if $$Config{'options'}{'varfields'}
131 0 1 if @varnames
146 0 0 if (not defined $symbol or *{$symbol;}{'NAME'} eq 'ANON')
149 0 0 if ($^S) { }
158 0 0 unless defined $data
159 0 0 if (ref $data) { }
164 0 0 if $self eq '.'
166 0 0 if ($self eq '_') { }
168 0 0 if $$Config{'options'}{'varthis'}
169 0 0 unless $$Config{'options'}{'varthis'}
170 0 0 if $$Config{'options'}{'hatthis'}
171 0 0 unless $self
175 0 0 if $$Config{'options'}{'subthis'}
176 0 0 if $$Config{'options'}{'hatthis'}
177 0 0 if $$Config{'options'}{'varthis'}
186 0 0 if ($aname =~ /^\@(\w+)$/ and $aname eq $args[-1])
189 0 0 if $$Config{'options'}{'hatargs'}
190 0 0 if $$Config{'options'}{'varargs'}
193 0 0 if ($aname =~ /^\%(\w+)$/ and $aname eq $args[-1])
196 0 0 if $$Config{'options'}{'hatargs'}
197 0 0 if $$Config{'options'}{'varargs'}
201 0 0 unless ($aname =~ /^\w+$/)
207 0 0 if ($aname eq '_') { }
210 0 0 if $$Config{'options'}{'hatargs'}
211 0 0 if $$Config{'options'}{'varargs'}
219 0 0 if $$Config{'options'}{'hatfields'}
220 0 0 if $$Config{'options'}{'varfields'}
223 0 0 if (defined $proto) { }
228 0 0 if ($$Config{'options'}{'debug'})
243 0 0 if $@
246 0 0 unless eval '$' . $sympkg . '::{$symname} = $subref'
260 0 0 if (not defined $symbol or *{$symbol;}{'NAME'} eq 'ANON')
263 0 0 if ($^S) { }
272 0 0 unless defined $data
273 0 0 if (ref $data) { }
278 0 0 if $class eq '.'
282 0 0 if ($self eq '_') { }
284 0 0 if $$Config{'options'}{'varthis'}
285 0 0 unless $$Config{'options'}{'varthis'}
286 0 0 if $$Config{'options'}{'hatthis'}
287 0 0 unless $self
291 0 0 if $$Config{'options'}{'subthis'}
292 0 0 if $$Config{'options'}{'hatthis'}
293 0 0 if $$Config{'options'}{'varthis'}
296 0 0 if ($class eq '_') { }
298 0 0 if $$Config{'options'}{'varthis'}
299 0 0 if $$Config{'options'}{'hatthis'}
300 0 0 unless $class
304 0 0 if $$Config{'options'}{'subclass'}
305 0 0 if $$Config{'options'}{'hatclass'}
306 0 0 if $$Config{'options'}{'varclass'}
310 0 0 if ($aname =~ /^\@(\w+)$/ and $aname eq $args[-1])
313 0 0 if $$Config{'options'}{'hatargs'}
314 0 0 if $$Config{'options'}{'varargs'}
317 0 0 if ($aname =~ /^\%(\w+)$/ and $aname eq $args[-1])
320 0 0 if $$Config{'options'}{'hatargs'}
321 0 0 if $$Config{'options'}{'varargs'}
325 0 0 unless ($aname =~ /^\w+$/)
331 0 0 if ($aname eq '_') { }
334 0 0 if $$Config{'options'}{'hatargs'}
335 0 0 if $$Config{'options'}{'varargs'}
348 0 0 if (defined $proto) { }
353 0 0 if ($$Config{'options'}{'debug'})
366 0 0 if $@
369 0 0 unless eval '$' . $sympkg . '::{$symname} = $subref'
384 0 0 if $symcache{join $;, $pkg, $ref} and *{$symcache{join $;, $pkg, $ref};}{'CODE'} eq $ref
387 0 0 if *{$_;}{'CODE'} and *{$_;}{'CODE'} eq $ref
403 0 0 if (@oa)
406 0 0 unless $ClassMethods{$pkg}
411 0 0 unless $Methods{$pkg}
437 0 0 if ($spkg eq 'Class::MethodVars::_ATTRS')
446 0 0 if (@oa and $next = $oa[0]->can('import'))
464 0 1 if (@oa and $next = $oa[0]->can('import'))
472 1 0 if (/\A(?:Class)?Method(?:\(.*)?\z/) { }
478 0 1 if (@good_attrs > 1) { }
1 0 elsif (@good_attrs) { }
483 0 1 if $good_attrs[0] =~ /\((.*)\)\s*\z/
484 1 0 if ($good_attrs[0] =~ /\AClassMethod/) { }
506 0 1 unless $Class::MethodVars::Configs{$pkg}
507 0 1 unless $Class::MethodVars::Configs{$pkg}{'fields'}