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])
91 4 0 if ($seconds)
124 0 1 if ($_[0] and ref $_[0] and ref $_[0] eq 'HASH')
129 0 2 defined $_[-1] && $_[-1] eq '-secure' ? :
132 1 1 if ref $_[-1] and ref $_[-1] eq 'CODE'
135 0 2 unless ($host =~ s[^\s*(?:http(s?)://)?([^/]+)/*\s*$][$2]u)
138 0 2 if $1
142 0 2 if $_[0] and ref $_[0] eq 'ARRAY'
153 2 0 if ($xrd)
156 0 2 if $rel
159 1 1 if $cb or wantarray
162 1 1 if $cb
163 0 1 if wantarray
169 0 0 if $secure
173 0 0 if ($cb)
178 0 0 if ($xrd)
191 0 0 if $rel
206 0 0 unless $xrd
219 0 0 if $rel
222 0 0 if wantarray
236 0 13 if defined $_[-1] and $_[-1] eq '-secure'
239 0 4 if $_[0] and ref $_[0] and ref $_[0] eq 'HASH'
242 3 10 if ref $_[-1] and ref $_[-1] eq 'CODE'
251 2 11 if ($plugins->has_subscribers($phm))
263 1 12 unless ($plugins->has_subscribers('before_serving_hostmeta'))
266 0 1 if $rel
269 0 1 if $cb
283 3 9 if $rel
286 3 9 if $cb