Branch Coverage

blib/lib/HTML/DOM/EventTarget.pm
Criterion Covered Total %
branch 67 78 85.9


line true false branch
129 95 4 if exists $h->{$self} and exists $h->{$self}{$name}
147 3476 13 unless $meth =~ /^on([a-z]+)\z/
175 17 8 if @_
176 10 15 unless $old
207 1087 5448 $h && exists $h->{$name} ? :
209 13 6522 if (not $capture and exists $aevh{$self} and exists $aevh{$self}{$name} and defined(my $aevh = $aevh{$self}{$name})) { }
212 2 8 defined &blessed($aevh) && $aevh->can('call_with') ? :
216 1 7 $name eq 'mouseover' ? :
2 6 if defined $ret and $name eq 'mouseover' ? $ret : !$ret
258 585 1339 unless $event &&= shift()
259 1339 585 $event ? :
261 6 1918 unless defined $name and length $name
265 1331 587 if $event and not $event->target
277 4 1894 unless &$sub($doc || $target)
305 10 2971 if (@l and not $initted++)
315 0 0 unless $e->target
321 10 2971 if @l
323 0 18 unless eval { do { defined &blessed($_) && $_->can('handleEvent') ? $_->handleEvent($event) : &$_($event); 1 } }
324 0 18 defined &blessed($_) && $_->can('handleEvent') ? :
329 2 2731 if ($event || (next))->propagation_stopped
334 768 1144 if (@l)
335 760 8 unless ($initted++)
343 229 0 unless $e->target
351 0 780 defined &blessed($_) && $_->can('handleEvent') ? :
358 1556 356 $event ? :
400 1512 if $event ? $event->propagation_stopped || !$event->bubbles : !$args{'propagates_up'}
363 217 1087 if (@l)
364 19 198 unless ($initted++)
372 0 0 unless $e->target
377 121 96 unless ($initted2++)
382 217 1087 if @l
384 0 223 defined &blessed($_) && $_->can('handleEvent') ? :
388 2 1066 if ($event || (next))->propagation_stopped
444 585 1312 if ($args{'auto_viv'})
450 585 0 if (my $rv = _dispatch_event($target, 0, $cat, $args{'auto_viv'}, @init_args))
458 3 0 unless (ref $rv)
473 4 1308 defined &blessed($event) && $event->isa('HTML::DOM::Event') ? :
487 1308 4 if $target->dispatchEvent($event)
490 1184 24 unless $args{"${type}_default"} or $args{'default'}