Branch Coverage

blib/lib/Mojolicious/Plugin/HostMeta.pm
Criterion Covered Total %
branch 38 70 54.2


line true false branch
18 0 1 if (my $config_param = $app->config('HostMeta'))
27 2 0 unless exists $$helpers{lc $_}
31 1 0 unless (exists $helpers->{'new_xrd'})
40 0 1 if ($param->{'expires'} and $param->{'expires'} =~ /^\d+$/u)
56 1 0 if $host
66 6 5 unless defined $_[0]
69 9 2 if (not $_[0] or ref $_[0])
92 4 0 if ($seconds)
125 0 1 if ($_[0] and ref $_[0] and ref $_[0] eq 'HASH')
130 0 2 defined $_[-1] && $_[-1] eq '-secure' ? :
133 1 1 if ref $_[-1] and ref $_[-1] eq 'CODE'
136 0 2 unless ($host =~ s[^\s*(?:http(s?)://)?([^/]+)/*\s*$][$2]u)
139 0 2 if $1
143 0 2 if $_[0] and ref $_[0] eq 'ARRAY'
154 2 0 if ($xrd)
157 0 2 if $rel
160 1 1 if $cb or wantarray
163 1 1 if $cb
164 0 1 if wantarray
170 0 0 if $secure
174 0 0 if ($cb)
179 0 0 if ($xrd)
192 0 0 if $rel
207 0 0 unless $xrd
220 0 0 if $rel
223 0 0 if wantarray
237 0 13 if defined $_[-1] and $_[-1] eq '-secure'
240 0 4 if $_[0] and ref $_[0] and ref $_[0] eq 'HASH'
243 3 10 if ref $_[-1] and ref $_[-1] eq 'CODE'
252 2 11 if ($plugins->has_subscribers($phm))
264 1 12 unless ($plugins->has_subscribers('before_serving_hostmeta'))
267 0 1 if $rel
270 0 1 if $cb
284 3 9 if $rel
287 3 9 if $cb