Changeset 2401

Show
Ignore:
Timestamp:
12/07/07 17:11:46
Author:
miyagawa
Message:

accept 0 as a return value

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Web-Scraper/trunk/lib/Web/Scraper.pm

    r2397 r2401  
    233233 
    234234    no warnings 'uninitialized'; 
    235     if (($retval =~ /^\d+$/ and $_ ne $value) or (defined $retval and !$retval)) { 
     235    # sub { s/foo/bar/ } returns number or PL_sv_no which is stringified to '' 
     236    if (($retval =~ /^\d+$/ and $_ ne $value) or (defined($retval) and $retval eq '')) { 
    236237        $value = $_; 
    237238    } else {