Branch Coverage

lib/HTML/Object/XPath/Function.pm
Criterion Covered Total %
branch 17 92 18.4


line true false branch
40 0 25 unless $self->SUPER::init(@_)
51 0 0 if $second++
67 0 0 if ($params) { }
82 0 0 if @params != 1
99 0 8 if @params < 2
109 0 8 unless @params == 2
111 4 4 if ($params[0]->string_value =~ /(.*?)\Q$value\E(.*)/)
122 0 20 unless $params[0]->isa("HTML::Object::XPath::NodeSet")
147 0 0 if @params > 0
164 0 4 unless @params == 1
166 0 4 if ($self->_is_a($params[0], 'HTML::Object::XPath::NodeSet')) { }
186 0 4 if ($node->isAttributeNode)
193 4 0 if (my $found = $node->getElementById($id))
206 0 0 if @params != 1
210 0 0 if (substr(lc $lang, 0, length $lclang) eq $lclang) { }
224 0 0 if scalar @params
232 0 0 if (@params > 1) { }
0 0 elsif (@params) { }
248 0 0 if (@params > 1) { }
0 0 elsif (@params) { }
277 0 8 if @params > 1
279 8 0 if (@params) { }
299 0 0 unless $params[0]->isa("HTML::Object::XPath::Boolean")
300 0 0 $params[0]->value ? :
307 0 0 if @params > 1
308 0 0 if (@params)
310 0 0 if ($params[0]->isa("HTML::Object::XPath::Node"))
323 0 0 if (scalar @params)
346 0 0 unless @params == 2
348 0 0 if (substr($string1, 0, length $string2) eq $string2)
359 0 4 if @params > 1
360 4 0 if (@params)
374 0 0 if @params > 1
375 0 0 if (@params) { }
389 0 0 if @params < 2 or @params > 3
395 0 0 if (@params == 3) { }
410 0 2 unless @params == 2
413 2 0 if ($long =~ /\Q$short\E(.*)$/) { }
427 0 0 unless @params == 2
430 0 0 if ($long =~ /^(.*?)\Q$short\E/) { }
444 0 0 unless $params[0]->isa("HTML::Object::XPath::NodeSet")
457 0 0 if @params != 3
465 0 0 defined $repl{$1} ? :
0 0 exists $repl{$1} ? :
474 0 0 if @params > 0
482 0 46 if $@