Branch Coverage

blib/lib/Search/Circa/Parser.pm
Criterion Covered Total %
branch 2 102 1.9


line true false branch
123 0 1 if ($@ or $HTML::Parser::VERSION < 3) { }
139 0 0 if (lc $tag eq 'a' and $$att{'href'}) { }
0 0 elsif (lc $tag eq 'frame' and $$att{'src'}) { }
0 0 elsif (lc $tag eq 'meta' and defined %$att) { }
0 0 elsif ($tag eq 'area' and $$att{'href'}) { }
144 0 0 if ($$att{'name'} and lc $$att{'name'} eq 'description') { }
0 0 elsif (lc $$att{'http-equiv'} eq 'keywords' or lc $$att{'name'} eq 'keywords') { }
0 0 elsif (lc $$att{'http-equiv'} eq 'refresh' and $$att{'content'} =~ /\d*;URL=(.*)$/) { }
162 0 0 if $Search::Circa::Parser::inside{'script'} or $Search::Circa::Parser::inside{'style'}
173 0 0 unless $$rh{'niveau'}
174 0 0 unless $$rh{'categorie'}
176 0 0 if defined $$rh{'lastModif'}
178 0 0 if defined $$rh{'url_local'}
182 0 0 if ($$rh{'url_local'} or 'URI'->new($$rh{'url'})->scheme eq 'file') { }
187 0 0 if ($$rh{'url_local'})
189 0 0 if ($$rh{'url_local'} =~ m[.*/$])
191 0 0 if (-e "$$rh{'url_local'}/index.html") { }
0 0 elsif (-e "$$rh{'url_local'}/index.htm") { }
0 0 elsif (-e "$$rh{'url_local'}/default.htm") { }
207 0 0 if ($$rh{'url_local'}) { }
214 0 0 if ($res->is_success) { }
217 0 0 if ($$rh{'lastModif'})
222 0 0 if ($$rh{'lastModif'} and $res->last_modified and $$rh{'lastModif'} >= $res->last_modified)
229 0 0 if ($res->last_modified) { }
236 0 0 if ($$this{'inindex'})
237 0 0 $ENV{'SERVER_NAME'} ? :
245 0 0 if ($$this{'_parser_ok'}) { }
255 0 0 unless $parser->parse($res->content)
262 0 0 if ($1 or $3)
273 0 0 if ($$rh{'categorieAuto'})
277 0 0 unless ($$rh{'categorie'})
279 0 0 if ($$this{'INDEXER'}->URL->update($$rh{'idr'}, ('parse', 1, 'id', $$rh{'idc'}, 'titre', $titre, 'description', $desc, 'last_update', $lastUpdate, 'last_check', 'NOW()', 'langue', $language, 'categorie', $$rh{'categorie'})))
309 0 0 if (scalar keys %Search::Circa::Parser::links < scalar(keys %$Search::Circa::Parser::RM) * 0.5) { }
311 0 0 if not $nb or $nb < $$this{'ConfigMoteur'}{'nb_min_mots'}
316 0 0 if $$this{'INDEXER'}->dbh->do($requete)
328 0 0 if ($$rh{'niveau'} == $$this{'ConfigMoteur'}{'niveau_max'})
336 0 0 if $#l > 0
340 0 0 if ($$rh{'url_local'} and $var) { }
0 0 elsif ($var) { }
345 0 0 if ($$this{'INDEXER'}->URL->add($$rh{'idr'}, ('url', $urlb, 'urllocal', $var, 'niveau', $$rh{'niveau'} + 1, 'categorie', $$rh{'categorie'}, 'valide', 1, 'browse_categorie', $$rh{'categorieAuto'}))) { }
359 0 0 if ($$this{'INDEXER'}->URL->add($$rh{'idr'}, ('url', $var, 'niveau', $$rh{'niveau'} + 1, 'categorie', $$rh{'categorie'}, 'valide', 1))) { }
385 0 0 if $$self{'AGENT'} and $$self{'_ROBOT'} == $locale
387 0 0 if ($$self{'ConfigMoteur'}{'temporate'} and not $locale) { }
393 0 0 if ($$self{'PROXY'})
394 0 0 if $$self{'INDEXER'}->size_max
406 0 0 unless $data and $facteur
412 0 0 unless $_
414 0 0 if $e =~ /\w/ and length $e > 2 and not $bad{$e} and not $e =~ /^\d*$/
429 0 16 if ($tag and $links and $tag eq 'a' and $links =~ /\Q$host\E/ and not $links =~ /$bad/)
433 0 0 if ($links =~ /^(.*?)#/)
434 0 0 if (not $$self{'ConfigMoteur'}{'indexCgi'} and $links =~ /^(.*?)\?/)