Branch Coverage

blib/lib/WWW/Search/Ebay.pm
Criterion Covered Total %
branch 109 218 50.0


line true false branch
147 2 11 if $rhOptsArg->{'search_parse_debug'}
167 11 2 unless (defined $self->{'_options'})
202 13 0 if (defined $rhOptsArg)
208 15 3 if (WWW::Search::generic_option($key)) { }
211 14 1 if defined $rhOptsArg->{$key}
217 2 1 if defined $rhOptsArg->{$key}
239 1 10 if 0 < $self->{'_debug'}
267 0 11 if (25 < $self->{'_debug'})
276 0 11 if ($sTitle =~ /$qrTitle/i) { }
288 0 11 if ($sPageDate eq '') { }
300 11 0 if ($s =~ /The official eBay Time is now:(.+?(P[SD]T))\s*Pacific\s/i)
340 543 0 if $iBids ne '1'
350 0 543 $hit->bid_count ? :
370 0 543 unless ref $oTD
372 543 0 unless ref $oA
373 0 0 if (1 < $self->{'_debug'})
379 0 0 if ($sURL =~ /sibeleafcat=(\d+)/)
391 0 544 unless ref $oTDprice
393 91 453 if (1 < $self->{'_debug'})
397 0 544 if ($oTDprice->attr('class') =~ /\bebcBid\b/)
407 0 544 unless ($oTDprice->attr('class') =~ /\b(ebcPr|prices|prc)\b/)
415 0 544 if ($oTDprice->look_down('_tag', 'span', 'class', 'ebSold') or $oTDprice->look_down('_tag', 'span', 'class', 'bold bidsold'))
426 0 544 if (my $oChild = $oTDprice->look_down('_tag', 'div', 'itemprop', 'price'))
433 91 453 if 1 < $self->{'_debug'}
445 0 544 if ($iPrice =~ s/FREE\s+SHIPPING//i)
459 544 0 if (ref $oTDbids)
461 0 544 if (my $oChild = $oTDbids->look_down('_tag', 'div', 'class', 'bids'))
468 91 453 if (1 < $self->{'_debug'})
472 544 0 unless ($oTDbids->attr('class') =~ /\b(ebcBid|bids)\b/)
480 0 0 if $oTDbids->as_text =~ /SOLD/i
481 0 0 if $oTDbids->as_text =~ /(\d+)/
483 0 0 if ($iBids =~ /\A$W*-$W*\Z/ or $iBids =~ /\A$W*\Z/)
494 0 0 if ($iBids =~ /NO/i)
509 0 11 if ($oTD->attr('class') =~ /\bebcCty\b/)
516 11 0 if (my $oChild = $oTD->look_down('_tag', 'span', 'class', 'ship'))
527 0 11 if 1 < $self->{'_debug'}
528 0 11 if ($iPrice =~ /UNKNOWN/i)
533 11 0 if ($iPrice =~ /FREE/i)
537 0 11 unless $iPrice =~ /\d/
558 496 0 if (ref $oTDdate) { }
567 91 405 if 1 < $self->{'_debug'}
569 496 0 if ($s =~ /\bTIMEMS="(\d+)"/i)
573 91 405 if 1 < $self->{'_debug'}
579 0 0 if (ref $oTDdate)
582 0 0 unless ($sClass =~ /\b(col3|ebcTim|ti?me)\b/)
591 0 0 if 1 < $self->{'_debug'}
592 0 0 if ($sDateTemp =~ /---/)
608 0 0 if 1 < $self->{'_debug'}
609 0 0 if 1 < $self->{'_debug'}
611 0 0 if 1 < $self->{'_debug'}
613 0 0 if 1 < $self->{'_debug'}
637 0 0 unless my $oSR = shift()
641 0 0 $oSR->sold ? :
649 0 0 if 1 < $self->{'_debug'}
650 0 0 if 1 < $self->{'_debug'}
651 0 0 if (Date_Cmp($dateEnd, $dateNow) < 0)
761 5 0 if (ref $oDiv)
778 1 10 if 1 < $self->{'_debug'}
782 0 11 if ($sTitle =~ /$qrTitle/i)
808 0 11 if (ref $oDIV)
811 0 0 if ($sText =~ /0 results found for / and $sText =~ / so we searched for / || $sText =~ / so we removed keywords /)
830 0 11 if (ref $oLI)
832 0 0 if ($oLI->as_text =~ / keyword has been replaced /)
843 0 11 if (ref $oP)
846 0 0 if ($s =~ /0 results found in the/ and $s =~ /so we searched in all categories/)
856 1 10 if (scalar @aoResultCountTagset < 1)
865 1 9 if 1 < $self->{'_debug'}
866 10 0 if ($oFONT->as_text =~ /$qr/)
869 1 9 if 1 < $self->{'_debug'}
877 6 5 if ($self->approximate_result_count < 1)
887 0 5 if ref $oUL
893 0 5 if (ref $oDiv)
902 0 5 unless (@aoTD)
904 0 0 if $self->{'_debug'}
913 0 543 unless ref $oTDtitle
915 91 452 if 1 < $self->{'_debug'}
918 0 543 unless ref $oA
921 0 543 if $sTitle eq ''
922 91 452 if 1 < $self->{'_debug'}
925 0 543 unless $oURI =~ /$qrItemNum/
927 91 452 if 1 < $self->{'_debug'}
929 0 543 if $oURI =~ /QQcategoryZ(\d+)QQ/
930 0 543 if ($oURI->as_string =~ /QQitemZ(\d+)QQ/)
949 91 452 if 1 < $self->{'_debug'}
953 0 2860 unless ref $oTDsib
956 722 2138 if ($sColumn eq '')
958 147 575 if 1 < $self->{'_debug'}
960 511 2349 if 1 < $self->{'_debug'}
961 544 2316 if ($sColumn =~ /price/)
963 0 544 unless $self->_parse_price($oTDsib, $hit)
965 544 2316 if ($sColumn =~ /bids/ or $sColumn =~ /format/)
970 11 2849 if ($sColumn =~ /shipping/)
972 0 11 unless $self->_parse_shipping($oTDsib, $hit)
974 0 2860 if ($sColumn =~ /end/)
976 0 0 unless $self->_parse_enddate($oTDsib, $hit)
978 496 2364 if ($sColumn =~ /time/)
980 0 496 unless $self->_parse_enddate($oTDsib, $hit)
982 0 2860 if ($sColumn =~ /country/)
988 543 2317 if ($sColumn =~ /extras/)
990 543 0 if ($iCategory < 0)
1003 0 496 if (defined($enddate = $hit->end_date) and defined($iBids = $hit->bid_count) and 0 < $iBids and Date_Cmp($enddate, 'now') < 0)
1016 91 452 if 1 < $self->{'_debug'}
1021 2 541 if ($self->approximate_result_count <= $iHits)
1092 0 0 unless ref $oLI
1093 0 0 if ($oLI->parent->same_as($oUL))
1096 0 0 unless ref $oA
1098 0 0 unless ref $oSPAN
1112 0 0 unless ref $oUL
1113 0 0 if ($oUL->parent->same_as($oLI))