Branch Coverage

blib/lib/LinkEmbedder.pm
Criterion Covered Total %
branch 27 48 56.2


line true false branch
58 0 0 unless ref $err eq 'HASH'
69 8 3 ref $args eq 'HASH' ? :
71 11 0 unless ref $args->{'url'}
75 5 6 if $args->{'url'} =~ /$PROTOCOL_RE/u
76 1 10 unless $link or $args->{'url'}->host
79 5 5 $link =~ /::/u ? :
80 5 5 unless _load($link)
97 8 0 if $user_agent
104 3 5 if $err
105 1 7 if $format eq 'html'
107 3 4 $err ? :
108 3 4 unless $format eq 'jsonp'
124 0 0 if $expect->{'isa'}
126 0 0 if $expect->{'class'}
129 0 0 if $key eq 'isa' or $key eq 'class'
130 0 0 ref $expect->{$key} eq 'ARRAY' ? :
131 0 0 ref $exp eq 'Regexp' ? :
142 0 0 unless $ok
152 0 5 if $hash->{$host}
154 5 0 if $host =~ /([^\.]+\.\w+)$/u
155 0 5 if $hash->{$host}
157 5 0 if $host =~ /([^\.]+)\.\w+$/u
170 0 10 if ref $@
171 5 5 $@ ? :