Branch Coverage

blib/lib/Sub/HandlesVia/Handler.pm.mite.pm
Criterion Covered Total %
branch 213 480 44.3


line true false branch
64 1 191 *{$_;}{'CODE'} ? :
68 0 192 *{$_;}{'CODE'} ? :
78 0 5780 ref $_[0] ? :
84 0 5780 @_ == 1 ? :
0 5780 $meta->{'HAS_BUILDARGS'} ? :
89 5780 0 if (exists $args->{'name'})
90 0 5780 unless do {
93 5780 0 if (defined $args->{'name'})
95 0 5780 unless ref \$args->{'name'} eq "SCALAR"
105 5780 0 if (exists $args->{'template'})
106 0 5780 unless do {
109 5780 0 if (defined $args->{'template'})
111 0 5780 unless ref \$args->{'template'} eq "SCALAR"
121 2457 3323 if (exists $args->{'lvalue_template'})
122 0 2457 unless do {
125 2457 0 if (defined $args->{'lvalue_template'})
127 0 2457 unless ref \$args->{'lvalue_template'} eq "SCALAR"
139 4350 1430 exists $args->{'args'} ? :
140 0 5780 unless do {
145 2108 3672 unless do {
147 3672 2108 if defined $tmp and not ref $tmp
162 2551 3229 if (exists $args->{'min_args'})
163 0 2551 unless do {
170 2467 84 if defined $tmp and not ref $tmp
175 84 2467 unless (do {
189 2219 3561 if (exists $args->{'max_args'})
190 0 2219 unless do {
197 2006 213 if defined $tmp and not ref $tmp
202 213 2006 unless (do {
216 4002 1778 if (exists $args->{'signature'})
217 0 4002 unless do {
226 213 3789 unless (do {
240 3222 2558 if (exists $args->{'usage'})
241 0 3222 unless do {
244 3222 0 if (defined $args->{'usage'})
246 0 3222 unless ref \$args->{'usage'} eq "SCALAR"
256 1388 4392 if (exists $args->{'curried'})
257 0 1388 unless do {
269 18 5762 if (exists $args->{'is_chainable'})
283 18 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
287 0 18 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
301 0 5780 if (exists $args->{'no_validation_needed'})
315 0 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
319 0 0 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
333 3 5777 if (exists $args->{'is_mutator'})
347 3 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
351 0 3 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
368 1415 4365 exists $args->{'allow_getter_shortcuts'} ? :
383 5780 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
387 0 5780 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
404 1809 3971 exists $args->{'prefer_shift_self'} ? :
419 5780 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
423 0 496 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
437 1996 3784 if (exists $args->{'additional_validation'})
438 0 1996 unless do {
450 671 0 if (defined $args->{'additional_validation'})
453 0 671 unless ref \$args->{'additional_validation'} eq "SCALAR"
457 0 671 unless (do {
471 60 5720 if (exists $args->{'default_for_reset'})
472 0 60 unless do {
484 5777 3 if (exists $args->{'documentation'})
485 0 5777 unless do {
488 5777 0 if (defined $args->{'documentation'})
490 0 5777 unless ref \$args->{'documentation'} eq "SCALAR"
501 3851 1929 if (exists $args->{'_examples'})
502 0 3851 unless do {
513 0 5780 unless $meta->{'BUILD'}
0 5780 if not $no_build and @{[] unless $meta->{'BUILD'};}
520 0 5780 if @unknown
530 0 2 unless $meta->{'BUILD'}
538 5783 0 defined ${^GLOBAL_PHASE} ? :
542 0 5783 unless $meta->{'DEMOLISH'}
549 0 0 if $e
691 0 4219 unless @_ == 1
694 4 4215 exists $_[0]{'is_mutator'} ? :
709 4215 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
713 0 2442 unless not ref $default_value and !defined($default_value) || $default_value eq '' || $default_value eq '0' || $default_value eq '1'
747 0 12442 unless @_ == 1
750 10027 2415 exists $_[0]{'max_args'} ? :
752 0 2415 unless do {
757 584 1831 unless do {
759 1831 584 if defined $tmp and not ref $tmp
778 0 5985 unless @_ == 1
781 3886 2099 exists $_[0]{'min_args'} ? :
783 0 2099 unless do {
788 268 1831 unless do {
790 1831 268 if defined $tmp and not ref $tmp
889 0 2638 unless @_ == 1
892 367 2271 exists $_[0]{'usage'} ? :
894 0 2271 unless do {
897 2271 0 if (defined $default_value)
898 0 2271 unless ref \$default_value eq "SCALAR"
915 0 6204 if exists $DOES{$role}
916 0 6204 if $role eq "Sub::HandlesVia::Handler"
917 0 6204 if ($INC{'Moose/Util.pm'} and my $meta = Moose::Util::find_meta(ref $self || $self))
920 0 0 if $meta->can("does_role") and $meta->does_role($role)
996 0 1 ref $_[0] ? :
1002 0 1 @_ == 1 ? :
0 1 $meta->{'HAS_BUILDARGS'} ? :
1007 0 1 if (exists $args->{'template'})
1008 0 0 unless do {
1011 0 0 if (defined $args->{'template'})
1013 0 0 unless ref \$args->{'template'} eq "SCALAR"
1023 0 1 if (exists $args->{'lvalue_template'})
1024 0 0 unless do {
1027 0 0 if (defined $args->{'lvalue_template'})
1029 0 0 unless ref \$args->{'lvalue_template'} eq "SCALAR"
1041 0 1 exists $args->{'args'} ? :
1042 0 1 unless do {
1047 1 0 unless do {
1049 0 1 if defined $tmp and not ref $tmp
1064 0 1 if (exists $args->{'min_args'})
1065 0 0 unless do {
1072 0 0 if defined $tmp and not ref $tmp
1077 0 0 unless (do {
1091 0 1 if (exists $args->{'max_args'})
1092 0 0 unless do {
1099 0 0 if defined $tmp and not ref $tmp
1104 0 0 unless (do {
1118 0 1 if (exists $args->{'signature'})
1119 0 0 unless do {
1128 0 0 unless (do {
1142 0 1 if (exists $args->{'usage'})
1143 0 0 unless do {
1146 0 0 if (defined $args->{'usage'})
1148 0 0 unless ref \$args->{'usage'} eq "SCALAR"
1158 0 1 if (exists $args->{'curried'})
1159 0 0 unless do {
1171 0 1 if (exists $args->{'is_chainable'})
1185 0 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1189 0 0 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1203 0 1 if (exists $args->{'no_validation_needed'})
1217 0 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1221 0 0 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1235 0 1 if (exists $args->{'is_mutator'})
1249 0 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1253 0 0 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1270 0 1 exists $args->{'allow_getter_shortcuts'} ? :
1285 1 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1289 0 1 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1306 0 1 exists $args->{'prefer_shift_self'} ? :
1321 1 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1325 0 0 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1339 0 1 if (exists $args->{'additional_validation'})
1340 0 0 unless do {
1352 0 0 if (defined $args->{'additional_validation'})
1355 0 0 unless ref \$args->{'additional_validation'} eq "SCALAR"
1359 0 0 unless (do {
1373 0 1 if (exists $args->{'default_for_reset'})
1374 0 0 unless do {
1386 0 1 if (exists $args->{'documentation'})
1387 0 0 unless do {
1390 0 0 if (defined $args->{'documentation'})
1392 0 0 unless ref \$args->{'documentation'} eq "SCALAR"
1403 0 1 if (exists $args->{'_examples'})
1404 0 0 unless do {
1416 0 1 unless exists $args->{'name'}
1417 0 1 unless do {
1420 1 0 if (defined $args->{'name'})
1422 0 1 unless ref \$args->{'name'} eq "SCALAR"
1430 0 1 unless $meta->{'BUILD'}
0 1 if not $no_build and @{[] unless $meta->{'BUILD'};}
1437 0 1 if @unknown
1465 0 2068 if exists $DOES{$role}
1466 0 2068 if $role eq "Sub::HandlesVia::Handler::Traditional"
1467 0 2068 if ($INC{'Moose/Util.pm'} and my $meta = Moose::Util::find_meta(ref $self || $self))
1470 0 0 if $meta->can("does_role") and $meta->does_role($role)
1546 0 2 ref $_[0] ? :
1552 0 2 @_ == 1 ? :
0 2 $meta->{'HAS_BUILDARGS'} ? :
1557 2 0 if (exists $args->{'name'})
1558 0 2 unless do {
1561 2 0 if (defined $args->{'name'})
1563 0 2 unless ref \$args->{'name'} eq "SCALAR"
1573 0 2 if (exists $args->{'template'})
1574 0 0 unless do {
1577 0 0 if (defined $args->{'template'})
1579 0 0 unless ref \$args->{'template'} eq "SCALAR"
1589 0 2 if (exists $args->{'lvalue_template'})
1590 0 0 unless do {
1593 0 0 if (defined $args->{'lvalue_template'})
1595 0 0 unless ref \$args->{'lvalue_template'} eq "SCALAR"
1607 1 1 exists $args->{'args'} ? :
1608 0 2 unless do {
1613 2 0 unless do {
1615 0 2 if defined $tmp and not ref $tmp
1630 1 1 if (exists $args->{'min_args'})
1631 0 1 unless do {
1638 0 1 if defined $tmp and not ref $tmp
1643 1 0 unless (do {
1657 1 1 if (exists $args->{'max_args'})
1658 0 1 unless do {
1665 0 1 if defined $tmp and not ref $tmp
1670 1 0 unless (do {
1684 1 1 if (exists $args->{'signature'})
1685 0 1 unless do {
1694 1 0 unless (do {
1708 0 2 if (exists $args->{'usage'})
1709 0 0 unless do {
1712 0 0 if (defined $args->{'usage'})
1714 0 0 unless ref \$args->{'usage'} eq "SCALAR"
1724 1 1 if (exists $args->{'curried'})
1725 0 1 unless do {
1737 0 2 if (exists $args->{'is_chainable'})
1751 0 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1755 0 0 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1769 0 2 if (exists $args->{'no_validation_needed'})
1783 0 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1787 0 0 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1801 0 2 if (exists $args->{'is_mutator'})
1815 0 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1819 0 0 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1836 1 1 exists $args->{'allow_getter_shortcuts'} ? :
1851 2 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1855 0 2 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1872 1 1 exists $args->{'prefer_shift_self'} ? :
1887 2 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1891 0 0 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1905 0 2 if (exists $args->{'additional_validation'})
1906 0 0 unless do {
1918 0 0 if (defined $args->{'additional_validation'})
1921 0 0 unless ref \$args->{'additional_validation'} eq "SCALAR"
1925 0 0 unless (do {
1939 0 2 if (exists $args->{'default_for_reset'})
1940 0 0 unless do {
1952 0 2 if (exists $args->{'documentation'})
1953 0 0 unless do {
1956 0 0 if (defined $args->{'documentation'})
1958 0 0 unless ref \$args->{'documentation'} eq "SCALAR"
1969 0 2 if (exists $args->{'_examples'})
1970 0 0 unless do {
1983 0 2 unless exists $args->{'delegated_coderef'}
1984 0 2 unless do {
1994 0 2 unless $meta->{'BUILD'}
2 0 if not $no_build and @{[] unless $meta->{'BUILD'};}
2001 0 2 if @unknown
2031 0 2068 if exists $DOES{$role}
2032 0 2068 if $role eq "Sub::HandlesVia::Handler::CodeRef"
2033 0 2068 if ($INC{'Moose/Util.pm'} and my $meta = Moose::Util::find_meta(ref $self || $self))
2036 0 0 if $meta->can("does_role") and $meta->does_role($role)