Branch Coverage

blib/lib/MooX/Role/Pluggable.pm
Criterion Covered Total %
branch 90 164 54.8


line true false branch
73 0 2 defined $params{'register_prefix'} ? :
75 1 1 if defined $reg_prefix
78 0 2 defined $params{'event_prefix'} ? :
80 0 2 if defined $ev_prefix
83 2 0 if (defined $params{'types'})
86 1 1 ref $params{'types'} eq 'HASH' ? :
0 2 ref $params{'types'} eq 'ARRAY' ? :
114 1 23 unless (ref $args)
119 16 7 if index($event, $prefix) == 0
126 17 6 if ($self->can($meth)) { }
2 4 elsif ($self->can('_default')) { }
140 5 18 if (not defined $self_ret) { }
0 18 elsif ($self_ret == 3) { }
0 18 elsif ($self_ret == 2) { }
15 3 elsif ($self_ret == 4) { }
153 0 8 if (@extra)
161 6 2 unless exists $$handle_ref{$_}{$type}{$event}
169 5 1 if ($thisplug->can($meth)) { }
1 0 elsif ($thisplug->can('_default')) { }
181 0 6 if (not defined $plug_ret) { }
1 5 elsif ($plug_ret == 3) { }
0 5 elsif ($plug_ret == 2) { }
0 5 elsif ($plug_ret == 4) { }
197 0 5 if (@extra)
209 1 24 if ($@) { }
0 24 elsif (not defined $_[3] or $_[3] != 1 and $_[3] != 4 and $_[3] != 2 and $_[3] != 3) { }
213 0 1 defined $src ? :
232 0 0 defined $src ? :
254 0 4 unless defined $alias and blessed $plugin
268 0 5 unless defined $alias_or_plug
279 0 2 unless (defined $item_plug)
284 1 1 wantarray ? :
301 0 3 unless defined $params{$_}
308 0 1 unless (defined $old_plug)
315 0 1 ref $params{'unregister_args'} eq 'ARRAY' ? :
324 0 1 ref $params{'register_args'} eq 'ARRAY' ? :
0 1 unless $self->__plug_pipe_register($new_alias, $new_plug, ref $params{'register_args'} eq 'ARRAY' ? @{$params{'register_args'};} : ())
329 1 0 if ($thisplug == $old_plug)
344 0 5 unless exists $self->__pluggable_opts->{'types'}{$type}
347 0 5 unless @events
350 0 5 unless blessed $plugin
357 0 6 if (ref $ev eq 'ARRAY')
370 0 0 unless exists $self->__pluggable_opts->{'types'}{$type}
373 0 0 unless blessed $plugin and defined $type
376 0 0 unless @events
383 0 0 if (ref $ev eq 'ARRAY') { }
385 0 0 unless (delete $$handles{$this_ev})
390 0 0 unless (delete $$handles{$ev})
406 0 4 if (my $existing = $self->__plugin_by_alias($alias))
412 0 4 unless $self->__plug_pipe_register($alias, $plug, @args)
422 0 0 unless @{$self->__pluggable_pipeline;}
429 0 0 wantarray ? :
435 0 1 if (my $existing = $self->__plugin_by_alias($alias))
441 0 1 unless $self->__plug_pipe_register($alias, $plug, @args)
451 0 1 unless @{$self->__pluggable_pipeline;}
458 0 1 wantarray ? :
466 0 5 unless (defined $old_plug)
474 5 1 if ($thisplug == $old_plug)
483 0 5 wantarray ? :
491 0 9 unless (defined $item_plug)
499 9 4 if $thisplug == $item_plug
517 0 3 unless defined $params{$_}
524 0 1 unless (defined $prev_plug)
530 0 1 if (my $existing = $self->__plugin_by_alias($params{'alias'}))
540 0 1 ref $params{'register_args'} eq 'ARRAY' ? :
0 1 unless $self->__plug_pipe_register($params{'alias'}, $params{'plugin'}, ref $params{'register_args'} eq 'ARRAY' ? @{$params{'register_args'};} : ())
546 1 1 if ($thisplug == $prev_plug)
561 0 3 unless defined $params{$_}
568 0 1 unless (defined $next_plug)
574 0 1 if (my $existing = $self->__plugin_by_alias($params{'alias'}))
584 0 1 ref $params{'register_args'} eq 'ARRAY' ? :
0 1 unless $self->__plug_pipe_register($params{'alias'}, $params{'plugin'}, ref $params{'register_args'} eq 'ARRAY' ? @{$params{'register_args'};} : ())
590 1 0 if ($thisplug == $next_plug)
604 0 1 unless $idx >= 0
608 0 1 unless ($pos >= 0)
622 0 1 unless $idx >= 0
626 0 1 if ($pos >= @{$self->__pluggable_pipeline;})
652 0 8 unless ($retval)
656 0 8 if ($err)
686 0 7 unless ($retval)
690 0 7 if ($err)
735 1 18 blessed $item ? :