Branch Coverage

lib/Class/MethodMaker/Engine.pm
Criterion Covered Total %
branch 35 126 27.7


line true false branch
48 0 8 $ENV{'_CMM_DEBUG'} ? :
81 0 6 exists $class_comps{$_[1]}{$_[2]} ? :
86 0 0 exists $class_comps{$_[1]}{$_[2]} ? :
156 2 38 unless @_
158 0 0 if (@_ == 1) { }
159 0 37 unless UNIVERSAL::isa($_[0], 'ARRAY')
163 0 1 unless @_ % 2 == 0
174 0 0 if ($mode == 1) { }
179 0 0 $#args / 2 > 1 ? :
187 0 0 if ($mode == 1) { }
281 0 0 if (not ref $$args[$i]) { }
284 0 0 if (substr($type, 0, 1) eq '-') { }
286 0 0 if ($option eq 'target_class') { }
287 0 0 if $i == $#$args
290 0 0 if ref $target_class
297 0 0 defined $options ? :
298 0 0 defined $renames ? :
300 0 0 if $i == $#$args
304 0 0 if (UNIVERSAL::isa($opts, 'SCALAR')) { }
0 0 elsif (UNIVERSAL::isa($opts, 'ARRAY')) { }
310 0 0 if (not ref $_) { }
0 0 elsif (UNIVERSAL::isa($_, 'HASH')) { }
0 0 elsif (UNIVERSAL::isa($_, 'ARRAY')) { }
311 0 0 if ($_ =~ /^[A-Za-z_][0-9A-Za-z_]*$/) { }
0 0 elsif ($_ =~ /^([-!])([0-9A-Za-z_]+)$/) { }
316 0 0 $1 eq '!' ? :
322 0 0 if (index($k, '*') > $[ - 1) { }
343 0 0 unless $created
369 0 0 unless defined $names
376 0 0 if (exists {abstract => {}, boolean => {rename => {*_clear => 'clear_*', *_set => 'set_*'}, v2name => '_boolean'}, code => {option => sub { ; } , rename => {*_clear => undef, *_isset => undef, *_reset => undef}, rephrase => sub { ; } , v2name => 'scalar'}, copy => {}, counter => {option => sub { ; } , rename => {*_clear => 'clear_*', *_get => 'get_*', *_set => 'set_*'}, rephrase => sub { ; } , v2name => 'scalar'}, deep_copy => {option => sub { ; } , rephrase => sub { ; } , v2name => 'copy'}, get_concat => {option => sub { ; } , rename => {*_clear => 'clear_*', *_get => 'get_*', *_set => 'set_*'}, rephrase => sub { ; } , v2name => 'scalar'}, get_set => {option => sub { ; } , rename => {*_clear => 'clear_*', *_get => 'get_*', *_set => 'set_*'}, v2name => 'scalar'}, hash => {rename => {* => undef, *_tally => '*_tally', *_v1compat => '*'}}, key_attrib => {option => sub { ; } , rename => {*_clear => 'clear_*', *_find => 'find_*', *_get => 'get_*', *_set => 'set_*'}, rephrase => sub { ; } , v2name => 'scalar'}, key_with_create => {option => sub { ; } , rename => {*_clear => 'clear_*', *_find => 'find_*', *_get => 'get_*', *_set => 'set_*'}, rephrase => sub { ; } , v2name => 'scalar'}, list => {rename => {*_count => ['*_count', 'count_*'], *_get => undef, *_index => ['*_index', 'index_*'], *_isset => undef, *_pop => ['*_pop', 'pop_*'], *_push => ['*_push', 'push_*'], *_ref => '*_ref', *_reset => ['*_clear', 'clear_*'], *_set => ['*_set', 'set_*'], *_shift => ['*_shift', 'shift_*'], *_splice => ['*_splice', 'splice_*'], *_unshift => ['*_unshift', 'unshift_*']}, v2name => 'array'}, method => {option => sub { ; } , rename => {*_clear => undef, *_isset => undef, *_reset => undef}, rephrase => sub { ; } , v2name => 'scalar'}, new => {}, new_hash_init => {option => sub { ; } , rephrase => sub { ; } , v2name => 'new'}, new_hash_with_init => {option => sub { ; } , rephrase => sub { ; } , v2name => 'new'}, new_with_args => {option => sub { ; } , rephrase => sub { ; } , v2name => 'new'}, new_with_init => {option => sub { ; } , rephrase => sub { ; } , v2name => 'new'}, object => {option => sub { ; } , rephrase => sub { ; } , v2name => 'scalar'}, object_list => {option => sub { ; } , rename => {*_count => ['*_count', 'count_*'], *_get => undef, *_index => ['*_index', 'index_*'], *_isset => undef, *_pop => ['*_pop', 'pop_*'], *_push => ['*_push', 'push_*'], *_ref => '*_ref', *_reset => ['*_clear', 'clear_*'], *_set => ['*_set', 'set_*'], *_shift => ['*_shift', 'shift_*'], *_splice => ['*_splice', 'splice_*'], *_unshift => ['*_unshift', 'unshift_*']}, rephrase => sub { for (; ; ) { ; } ; } , v2name => 'array'}, object_tie_hash => {option => sub { ; } , rename => {* => undef, *_tally => '*_tally', *_v1compat => '*'}, rephrase => sub { ; } , v2name => 'hash'}, object_tie_list => {option => sub { ; } , rename => {*_count => ['*_count', 'count_*'], *_get => undef, *_index => ['*_index', 'index_*'], *_isset => undef, *_pop => ['*_pop', 'pop_*'], *_push => ['*_push', 'push_*'], *_ref => '*_ref', *_reset => ['*_clear', 'clear_*'], *_set => ['*_set', 'set_*'], *_shift => ['*_shift', 'shift_*'], *_splice => ['*_splice', 'splice_*'], *_unshift => ['*_unshift', 'unshift_*']}, rephrase => sub { ; } , v2name => 'array'}, singleton => {option => sub { ; } , rephrase => sub { ; } , v2name => 'new'}, static_get_set => {option => sub { ; } , rename => {*_clear => 'clear_*', *_get => 'get_*', *_set => 'set_*'}, rephrase => sub { ; } , v2name => 'scalar'}, static_hash => {option => sub { ; } , rename => {* => undef, *_tally => '*_tally', *_v1compat => '*'}, rephrase => sub { ; } , v2name => 'hash'}, static_list => {option => sub { ; } , rename => {*_count => ['*_count', 'count_*'], *_get => undef, *_index => ['*_index', 'index_*'], *_isset => undef, *_pop => ['*_pop', 'pop_*'], *_push => ['*_push', 'push_*'], *_ref => '*_ref', *_reset => ['*_clear', 'clear_*'], *_set => ['*_set', 'set_*'], *_shift => ['*_shift', 'shift_*'], *_splice => ['*_splice', 'splice_*'], *_unshift => ['*_unshift', 'unshift_*']}, rephrase => sub { ; } , v2name => 'array'}, tie_hash => {option => sub { ; } , rename => {* => undef, *_tally => '*_tally', *_v1compat => '*'}, rephrase => sub { for (; ; ) { ; } ; } , v2name => 'hash'}, tie_list => {option => sub { ; } , rename => {*_count => ['*_count', 'count_*'], *_get => undef, *_index => ['*_index', 'index_*'], *_isset => undef, *_pop => ['*_pop', 'pop_*'], *_push => ['*_push', 'push_*'], *_ref => '*_ref', *_reset => ['*_clear', 'clear_*'], *_set => ['*_set', 'set_*'], *_shift => ['*_shift', 'shift_*'], *_splice => ['*_splice', 'splice_*'], *_unshift => ['*_unshift', 'unshift_*']}, rephrase => sub { for (; ; ) { ; } ; } , v2name => 'array'}, tie_scalar => {option => sub { ; } , rename => {*_clear => 'clear_*', *_get => 'get_*', *_set => 'set_*'}, rephrase => sub { for (; ; ) { ; } ; } , v2name => 'scalar'}}->{$v1type})
378 0 0 if exists $$v1compat{'v2name'}
393 0 0 if (defined $rephrase)
402 0 0 UNIVERSAL::isa($names, 'ARRAY') ? :
405 0 0 if (ref $_ or substr($_, 0, 1) eq '-') { }
409 0 0 if (defined $opt_handler) { }
519 0 0 if (exists $class_comps{$targetclass}{$compname})
532 0 0 defined $options ? :
533 0 0 if (exists $options{'type'} and substr($options{'type'}, 0, 1) eq '+')
537 0 0 if (exists $options{$optname}) { }
538 0 0 unless ref $options{$optname} eq 'ARRAY'
546 0 0 unless $compname =~ /^(?!\d)\w+$/
556 0 0 unless defined $ext
558 0 0 length $ext ? :
560 0 1 if (length $ext)
575 0 37 if ($@)
576 37 1 if ($@ =~ m[^Can't locate auto/Class/MethodMaker/(\S*)]) { }
578 0 1 if @$opts
590 0 2 exists $$names{'='} ? :
592 0 2 if (defined $names)
606 2 41 if (index($methname, ':') > -1)
611 2 0 unless exists $options{'typex'} and $type eq $options{'typex'}
614 3 54 unless (substr($methname, 0, 1) eq '!' and not exists $$renames{substr $methname, 1})
617 2 41 exists $$renames{$methname} ? :
624 0 43 if (not defined $realname and exists $$names{$methname})
636 11 0 if (defined $realname) { }
637 1 10 ref $realname ? :
643 57 11 if defined $names
774 2 0 if ($reftype eq 'CODE') { }
777 32 2 unless (defined *{$methname;}{'CODE'})
781 68 34 unless &Class::MethodMaker::set_sub_name($code, $target, $name, "${target}::$name")
800 0 43 if ref $known_opts eq 'ARRAY'
803 0 43 if (my(@bad_opt) = grep((!exists($$known_opts{$_})), keys %$options))
804 40 3 @bad_opt > 1 ? :