Skip Menu |

This queue is for tickets about the WWW-Search-Ebay CPAN distribution.

Report information
The Basics
Id: 129728
Status: resolved
Priority: 0/
Queue: WWW-Search-Ebay

Owner: MTHURN [...]
Requestors: julianaito [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: End dates parsing doesn't always work
Date: Sat, 1 Jun 2019 22:47:31 +0200
To: bug-WWW-Search-Ebay [...]
From: Charlene Wendling <julianaito [...]>
Download (untitled) / with headers
text/plain 1.5k
Hi, During a review of an OpenBSD port update for WWW-Search-Ebay to 3.052, Andrew Fresh found out that end_date is sometimes undefined [0]. For example when running (same with different search terms, see attached log): AutoSearch --engine Ebay -n BSD -s bsd bsd It generates several 'Use of uninitialized value in numeric lt (<) at /usr/local/libdata/perl5/site_perl/WWW/Search/ line 672.' This could be fixed with the patch below, but it may hide another issue. I tried to pinpoint it - i thought it was because ebay seems to add various empty <span id>, to break reliable parsing of the end of the auction. But you're using 'timems' attribute instead. I hope it helps. Charlène. [0] $OpenBSD$ Index: lib/WWW/Search/ --- lib/WWW/Search/ +++ lib/WWW/Search/ @@ -669,7 +669,7 @@ sub result_as_HTML my $dateNow = ParseDate('now'); print STDERR " DDD compare end_date ==$dateEnd==\n" if (DEBUG_DATES || (1 < $self->{_debug})); print STDERR " DDD compare date_now ==$dateNow==\n" if (DEBUG_DATES || (1 < $self->{_debug})); - if (Date_Cmp($dateEnd, $dateNow) < 0) + if ((Date_Cmp($dateEnd, $dateNow) || 0) < 0) { $sEndedColor = 'red'; $sEndedWord = 'ended'; @@ -1040,7 +1040,7 @@ sub _parse_tree && (0 < $iBids) # Item got any bids && - (Date_Cmp($enddate, 'now') < 0) # Item is ended + ((Date_Cmp($enddate, 'now') || 0) < 0) # Item is ended ) { # Item must have been sold!?!
Download WWW-Search-Ebay.log
application/octet-stream 65.3k

Message body not shown because it is not plain text.

Pretty sure distro 3.054 fixes this Just uploaded a couple minutes ago

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to