Branch Coverage

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


line true false branch
66 1 195 *{$_;}{'CODE'} ? :
70 0 196 *{$_;}{'CODE'} ? :
80 0 5821 ref $_[0] ? :
86 0 5821 @_ == 1 ? :
0 5821 $meta->{'HAS_BUILDARGS'} ? :
91 5821 0 if (exists $args->{'name'})
92 0 5821 unless do {
95 5821 0 if (defined $args->{'name'})
97 0 5821 unless ref \$args->{'name'} eq "SCALAR"
107 5821 0 if (exists $args->{'template'})
108 0 5821 unless do {
111 5821 0 if (defined $args->{'template'})
113 0 5821 unless ref \$args->{'template'} eq "SCALAR"
123 2476 3345 if (exists $args->{'lvalue_template'})
124 0 2476 unless do {
127 2476 0 if (defined $args->{'lvalue_template'})
129 0 2476 unless ref \$args->{'lvalue_template'} eq "SCALAR"
141 4389 1432 exists $args->{'args'} ? :
142 0 5821 unless do {
147 2112 3709 unless do {
149 3709 2112 if defined $tmp and not ref $tmp
164 2565 3256 if (exists $args->{'min_args'})
165 0 2565 unless do {
172 2481 84 if defined $tmp and not ref $tmp
177 84 2481 unless (do {
191 2233 3588 if (exists $args->{'max_args'})
192 0 2233 unless do {
199 2020 213 if defined $tmp and not ref $tmp
204 213 2020 unless (do {
218 4032 1789 if (exists $args->{'signature'})
219 0 4032 unless do {
228 213 3819 unless (do {
242 3235 2586 if (exists $args->{'usage'})
243 0 3235 unless do {
246 3235 0 if (defined $args->{'usage'})
248 0 3235 unless ref \$args->{'usage'} eq "SCALAR"
258 1402 4419 if (exists $args->{'curried'})
259 0 1402 unless do {
271 20 5801 if (exists $args->{'is_chainable'})
285 20 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
289 0 20 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
303 0 5821 if (exists $args->{'no_validation_needed'})
317 0 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
321 0 0 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
335 3 5818 if (exists $args->{'is_mutator'})
349 3 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
353 0 3 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
370 1431 4390 exists $args->{'allow_getter_shortcuts'} ? :
385 5821 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
389 0 5821 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
406 1827 3994 exists $args->{'prefer_shift_self'} ? :
421 5821 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
425 0 500 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
439 2002 3819 if (exists $args->{'additional_validation'})
440 0 2002 unless do {
452 673 0 if (defined $args->{'additional_validation'})
455 0 673 unless ref \$args->{'additional_validation'} eq "SCALAR"
459 0 673 unless (do {
473 60 5761 if (exists $args->{'default_for_reset'})
474 0 60 unless do {
486 5818 3 if (exists $args->{'documentation'})
487 0 5818 unless do {
490 5818 0 if (defined $args->{'documentation'})
492 0 5818 unless ref \$args->{'documentation'} eq "SCALAR"
503 3866 1955 if (exists $args->{'_examples'})
504 0 3866 unless do {
515 0 5821 unless $meta->{'BUILD'}
0 5821 if not $no_build and @{[] unless $meta->{'BUILD'};}
522 0 5821 if @unknown
532 0 2 unless $meta->{'BUILD'}
540 5824 0 defined ${^GLOBAL_PHASE} ? :
544 0 5824 unless $meta->{'DEMOLISH'}
551 0 0 if $e
693 0 4244 unless @_ == 1
696 4 4240 exists $_[0]{'is_mutator'} ? :
711 4240 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
715 0 2453 unless not ref $default_value and !defined($default_value) || $default_value eq '' || $default_value eq '0' || $default_value eq '1'
749 0 12563 unless @_ == 1
752 10125 2438 exists $_[0]{'max_args'} ? :
754 0 2438 unless do {
759 586 1852 unless do {
761 1852 586 if defined $tmp and not ref $tmp
780 0 6036 unless @_ == 1
783 3914 2122 exists $_[0]{'min_args'} ? :
785 0 2122 unless do {
790 270 1852 unless do {
792 1852 270 if defined $tmp and not ref $tmp
891 0 2661 unless @_ == 1
894 369 2292 exists $_[0]{'usage'} ? :
896 0 2292 unless do {
899 2292 0 if (defined $default_value)
900 0 2292 unless ref \$default_value eq "SCALAR"
917 0 6912 if exists $DOES{$role}
918 0 6912 if $role eq "Sub::HandlesVia::Handler"
919 0 6912 if ($INC{'Moose/Util.pm'} and my $meta = Moose::Util::find_meta(ref $self || $self))
922 0 0 if $meta->can("does_role") and $meta->does_role($role)
1000 0 1 ref $_[0] ? :
1006 0 1 @_ == 1 ? :
0 1 $meta->{'HAS_BUILDARGS'} ? :
1011 0 1 if (exists $args->{'template'})
1012 0 0 unless do {
1015 0 0 if (defined $args->{'template'})
1017 0 0 unless ref \$args->{'template'} eq "SCALAR"
1027 0 1 if (exists $args->{'lvalue_template'})
1028 0 0 unless do {
1031 0 0 if (defined $args->{'lvalue_template'})
1033 0 0 unless ref \$args->{'lvalue_template'} eq "SCALAR"
1045 0 1 exists $args->{'args'} ? :
1046 0 1 unless do {
1051 1 0 unless do {
1053 0 1 if defined $tmp and not ref $tmp
1068 0 1 if (exists $args->{'min_args'})
1069 0 0 unless do {
1076 0 0 if defined $tmp and not ref $tmp
1081 0 0 unless (do {
1095 0 1 if (exists $args->{'max_args'})
1096 0 0 unless do {
1103 0 0 if defined $tmp and not ref $tmp
1108 0 0 unless (do {
1122 0 1 if (exists $args->{'signature'})
1123 0 0 unless do {
1132 0 0 unless (do {
1146 0 1 if (exists $args->{'usage'})
1147 0 0 unless do {
1150 0 0 if (defined $args->{'usage'})
1152 0 0 unless ref \$args->{'usage'} eq "SCALAR"
1162 0 1 if (exists $args->{'curried'})
1163 0 0 unless do {
1175 0 1 if (exists $args->{'is_chainable'})
1189 0 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1193 0 0 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1207 0 1 if (exists $args->{'no_validation_needed'})
1221 0 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1225 0 0 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1239 0 1 if (exists $args->{'is_mutator'})
1253 0 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1257 0 0 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1274 0 1 exists $args->{'allow_getter_shortcuts'} ? :
1289 1 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1293 0 1 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1310 0 1 exists $args->{'prefer_shift_self'} ? :
1325 1 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1329 0 0 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1343 0 1 if (exists $args->{'additional_validation'})
1344 0 0 unless do {
1356 0 0 if (defined $args->{'additional_validation'})
1359 0 0 unless ref \$args->{'additional_validation'} eq "SCALAR"
1363 0 0 unless (do {
1377 0 1 if (exists $args->{'default_for_reset'})
1378 0 0 unless do {
1390 0 1 if (exists $args->{'documentation'})
1391 0 0 unless do {
1394 0 0 if (defined $args->{'documentation'})
1396 0 0 unless ref \$args->{'documentation'} eq "SCALAR"
1407 0 1 if (exists $args->{'_examples'})
1408 0 0 unless do {
1420 0 1 unless exists $args->{'name'}
1421 0 1 unless do {
1424 1 0 if (defined $args->{'name'})
1426 0 1 unless ref \$args->{'name'} eq "SCALAR"
1434 0 1 unless $meta->{'BUILD'}
0 1 if not $no_build and @{[] unless $meta->{'BUILD'};}
1441 0 1 if @unknown
1469 0 2304 if exists $DOES{$role}
1470 0 2304 if $role eq "Sub::HandlesVia::Handler::Traditional"
1471 0 2304 if ($INC{'Moose/Util.pm'} and my $meta = Moose::Util::find_meta(ref $self || $self))
1474 0 0 if $meta->can("does_role") and $meta->does_role($role)
1552 0 2 ref $_[0] ? :
1558 0 2 @_ == 1 ? :
0 2 $meta->{'HAS_BUILDARGS'} ? :
1563 2 0 if (exists $args->{'name'})
1564 0 2 unless do {
1567 2 0 if (defined $args->{'name'})
1569 0 2 unless ref \$args->{'name'} eq "SCALAR"
1579 0 2 if (exists $args->{'template'})
1580 0 0 unless do {
1583 0 0 if (defined $args->{'template'})
1585 0 0 unless ref \$args->{'template'} eq "SCALAR"
1595 0 2 if (exists $args->{'lvalue_template'})
1596 0 0 unless do {
1599 0 0 if (defined $args->{'lvalue_template'})
1601 0 0 unless ref \$args->{'lvalue_template'} eq "SCALAR"
1613 1 1 exists $args->{'args'} ? :
1614 0 2 unless do {
1619 2 0 unless do {
1621 0 2 if defined $tmp and not ref $tmp
1636 1 1 if (exists $args->{'min_args'})
1637 0 1 unless do {
1644 0 1 if defined $tmp and not ref $tmp
1649 1 0 unless (do {
1663 1 1 if (exists $args->{'max_args'})
1664 0 1 unless do {
1671 0 1 if defined $tmp and not ref $tmp
1676 1 0 unless (do {
1690 1 1 if (exists $args->{'signature'})
1691 0 1 unless do {
1700 1 0 unless (do {
1714 0 2 if (exists $args->{'usage'})
1715 0 0 unless do {
1718 0 0 if (defined $args->{'usage'})
1720 0 0 unless ref \$args->{'usage'} eq "SCALAR"
1730 1 1 if (exists $args->{'curried'})
1731 0 1 unless do {
1743 0 2 if (exists $args->{'is_chainable'})
1757 0 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1761 0 0 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1775 0 2 if (exists $args->{'no_validation_needed'})
1789 0 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1793 0 0 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1807 0 2 if (exists $args->{'is_mutator'})
1821 0 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1825 0 0 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1842 1 1 exists $args->{'allow_getter_shortcuts'} ? :
1857 2 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1861 0 2 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1878 1 1 exists $args->{'prefer_shift_self'} ? :
1893 2 0 !ref($to_coerce) && (!defined($to_coerce) || $to_coerce eq '' || $to_coerce eq '0' || $to_coerce eq '1') ? :
1897 0 0 unless not ref $coerced_value and !defined($coerced_value) || $coerced_value eq '' || $coerced_value eq '0' || $coerced_value eq '1'
1911 0 2 if (exists $args->{'additional_validation'})
1912 0 0 unless do {
1924 0 0 if (defined $args->{'additional_validation'})
1927 0 0 unless ref \$args->{'additional_validation'} eq "SCALAR"
1931 0 0 unless (do {
1945 0 2 if (exists $args->{'default_for_reset'})
1946 0 0 unless do {
1958 0 2 if (exists $args->{'documentation'})
1959 0 0 unless do {
1962 0 0 if (defined $args->{'documentation'})
1964 0 0 unless ref \$args->{'documentation'} eq "SCALAR"
1975 0 2 if (exists $args->{'_examples'})
1976 0 0 unless do {
1989 0 2 unless exists $args->{'delegated_coderef'}
1990 0 2 unless do {
2000 0 2 unless $meta->{'BUILD'}
2 0 if not $no_build and @{[] unless $meta->{'BUILD'};}
2007 0 2 if @unknown
2037 0 2304 if exists $DOES{$role}
2038 0 2304 if $role eq "Sub::HandlesVia::Handler::CodeRef"
2039 0 2304 if ($INC{'Moose/Util.pm'} and my $meta = Moose::Util::find_meta(ref $self || $self))
2042 0 0 if $meta->can("does_role") and $meta->does_role($role)