Skip Menu |

This queue is for tickets about the WWW-Scraper-ISBN-ISBNdb_Driver CPAN distribution.

Report information
The Basics
Id: 48005
Status: resolved
Priority: 0/
Queue: WWW-Scraper-ISBN-ISBNdb_Driver

People
Owner: Nobody in particular
Requestors: castaway [...] desert-island.me.uk
THOMPSOP [...] sanfordhealth.org
Cc:
AdminCc:

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



Subject: Errors when publisher id missing from book data (patch attached)
Looking up a particular ISBN (see test in patch), produced results with no publisher id. The existing scraper code assumes there is always an id, and thus fails after fetching publisher data, and trying to findnodes() on an empty result. Patch contains test + code fix
Subject: scraper_isbndb_patch.diff
--- /usr/src/perl/cpanplus/5.10.0/build/WWW-Scraper-ISBN-ISBNdb_Driver-0.07/lib/WWW/Scraper/ISBN/ISBNdb_Driver.pm 2009-07-19 11:45:31.000000000 +0100 +++ ./lib/WWW/Scraper/ISBN/ISBNdb_Driver.pm 2009-03-13 03:50:26.000000000 +0000 @@ -117,19 +117,12 @@ my $pub_id = ($doc->findnodes('//PublisherText/@publisher_id'))[0]->to_literal; - my $pub_data; - if($pub_id) { my $publisher = $self->_fetch( 'publishers', 'publisher_id', $pub_id, 'details' ); - $pub_data = ($publisher->findnodes('//PublisherData'))[0]; - } + my $data = ($publisher->findnodes('//PublisherData'))[0]; return { - publisher => ($pub_data - ? ($pub_data->findnodes('//Name'))[0]->to_literal - : ''), - location => ($pub_data - ? ($pub_data->findnodes('//Details/@location'))[0]->to_literal - : ''), + publisher => ($data->findnodes('//Name'))[0]->to_literal, + location => ($data->findnodes('//Details/@location'))[0]->to_literal, year => $year || '' }; } --- /usr/src/perl/cpanplus/5.10.0/build/WWW-Scraper-ISBN-ISBNdb_Driver-0.07/t/02-missing.t 2009-07-19 11:47:49.000000000 +0100 +++ ./t/02-missing.t 1970-01-01 01:00:00.000000000 +0100 @@ -1,33 +0,0 @@ -#!perl -T - -use Test::More; - -my $access_key = $ENV{ISBNDB_ACCESS_KEY}; - -if( $access_key ) { - plan tests => 5; -} else { - plan skip_all => 'no isbndb.com access key provided in ISBNDB_ACCESS_KEY env variable'; -} - -use WWW::Scraper::ISBN; -# use ExtUtils::MakeMaker; - -my $scraper = new WWW::Scraper::ISBN(); -$scraper->drivers( qw/ ISBNdb / ); - -{ - no warnings; - $WWW::Scraper::ISBN::ISBNdb_Driver::ACCESS_KEY = $access_key; -} - -my( $res, $book ); - -$res = $scraper->search( '9780141021621' ); -$book = $res->book; -is( $book->{isbn}, '9780141021621', 'isbn' ); -is( $book->{title}, 'Skeleton Coast (Oregon Files 4)', 'title' ); -is( $book->{author}, '', 'author' ); -is( $book->{publisher}, '', 'publisher' ); -is( $book->{year}, '', 'year' ); -
Subject: Further note
Date: Tue, 18 Aug 2009 09:30:07 -0500
To: <bug-list-allutils [...] rt.cpan.org>
From: "Thompson,Paul" <THOMPSOP [...] sanfordhealth.org>
Download image001.gif
image/gif 70b
image001.gif
Specifically: 1) There is no Makefile.PL 2) When you "make test" you get an error no rule to make target 'test' 3) When you "make install", you get an error about no rule to make target 'install' Is there some good reason why this package does not follow the install instructions? Paul A. Thompson, Ph.D. Director, Methodology and Data Analysis Center Sanford Research Rm 204, Delaware Bldg 900 W Delaware St Sioux Falls, SD 57104 Contact Information Telephone: 605-312-6016 Cell Line: 618-974-0473 Email: thompsop@sanfordhealth.org ----------------------------------------------------------------------- Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain privileged and confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

Message body is not shown because it is too large.

Subject: Re: [rt.cpan.org #48806] Further note
Date: Tue, 18 Aug 2009 10:00:49 -0500 (CDT)
To: "Thompson,Paul via RT" <bug-List-AllUtils [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Tue, 18 Aug 2009, Thompson,Paul via RT wrote: Show quoted text
> 1) There is no Makefile.PL
There is a Build.PL. Show quoted text
> Is there some good reason why this package does not follow the install > instructions?
Because it's 2009, although normally I do have a Makefile.PL for backwards compatibility. Also, you really should just use the CPAN shell to do this stuff for you. It'll make your life easier. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
Subject: RE: [rt.cpan.org #48806] Further note
Date: Tue, 18 Aug 2009 10:06:09 -0500
To: <bug-List-AllUtils [...] rt.cpan.org>
From: "Thompson,Paul" <THOMPSOP [...] sanfordhealth.org>
I am just trying to run a simple program here, not become a fully qualified perl setup. This is one of the problems with gnu stuff. It takes forever to get everything set up. I ran perl Build.PL. It said Looks good to everything. The package is still not installed. I have no idea how to do that. Paul A. Thompson, Ph.D. Director, Methodology and Data Analysis Center Sanford Research Rm 204, Delaware Bldg 900 W Delaware St Sioux Falls, SD 57104 Contact Information Telephone: 605-312-6016 Cell Line: 618-974-0473 Email: thompsop@sanfordhealth.org Show quoted text
-----Original Message----- From: autarch@urth.org via RT [mailto:bug-List-AllUtils@rt.cpan.org] Sent: Tuesday, August 18, 2009 10:01 AM To: Thompson,Paul Subject: Re: [rt.cpan.org #48806] Further note <URL: https://rt.cpan.org/Ticket/Display.html?id=48806 > On Tue, 18 Aug 2009, Thompson,Paul via RT wrote:
> 1) There is no Makefile.PL
There is a Build.PL.
> Is there some good reason why this package does not follow the install > instructions?
Because it's 2009, although normally I do have a Makefile.PL for backwards compatibility. Also, you really should just use the CPAN shell to do this stuff for you. It'll make your life easier. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/ ----------------------------------------------------------------------- Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain privileged and confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Subject: RE: [rt.cpan.org #48806] Further note
Date: Tue, 18 Aug 2009 10:18:44 -0500 (CDT)
To: "Thompson,Paul via RT" <bug-List-AllUtils [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Tue, 18 Aug 2009, Thompson,Paul via RT wrote: Show quoted text
> I ran perl Build.PL. It said Looks good to everything. The package is still not installed. I have no idea how to do that.
http://search.cpan.org/~dagolden/Module-Build-0.340201/lib/Module/Build.pm -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
Subject: RE: [rt.cpan.org #48806] Further note
Date: Tue, 18 Aug 2009 10:57:01 -0500
To: <bug-List-AllUtils [...] rt.cpan.org>
From: "Thompson,Paul" <THOMPSOP [...] sanfordhealth.org>
Thanks. I installed the Module-Build mod. I then installed your module. You may wish to consider making your module consistent with perlmodinstall, which, IMVHO, it is not. Why? Currently, a new tool in LaTeX, bibit, uses a perl approach, and your package is required. I never heard of this until last Friday, as it is new bib stuff in TeX. Thus, others who are TeX/LaTeX users such as myself will be attempting to use the bibit tool, and will have the same problems that I have had. I have had to download about 30 perl packages, all of which installed according to perlmodinstall except yours. Doubtless there is a good reason for this, but I for one am not privy to it. Note that to install the CPAN::shell, about 30 other modules are required. Paul A. Thompson, Ph.D. Director, Methodology and Data Analysis Center Sanford Research Rm 204, Delaware Bldg 900 W Delaware St Sioux Falls, SD 57104 Contact Information Telephone: 605-312-6016 Cell Line: 618-974-0473 Email: thompsop@sanfordhealth.org Show quoted text
-----Original Message----- From: autarch@urth.org via RT [mailto:bug-List-AllUtils@rt.cpan.org] Sent: Tuesday, August 18, 2009 10:19 AM To: Thompson,Paul Subject: RE: [rt.cpan.org #48806] Further note <URL: http://rt.cpan.org/Ticket/Display.html?id=48806 > On Tue, 18 Aug 2009, Thompson,Paul via RT wrote:
> I ran perl Build.PL. It said Looks good to everything. The package is still not installed. I have no idea how to do that.
http://search.cpan.org/~dagolden/Module-Build-0.340201/lib/Module/Build.pm -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/ ----------------------------------------------------------------------- Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain privileged and confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Subject: RE: [rt.cpan.org #48806] Further note
Date: Tue, 18 Aug 2009 11:05:12 -0500 (CDT)
To: "Thompson,Paul via RT" <bug-List-AllUtils [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Tue, 18 Aug 2009, Thompson,Paul via RT wrote: Show quoted text
> Note that to install the CPAN::shell, about 30 other modules are required.
Yes, but you only have to do it once, and the modules are all free. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
Subject: RE: [rt.cpan.org #48806] Further note
Date: Tue, 18 Aug 2009 11:19:06 -0500
To: <bug-List-AllUtils [...] rt.cpan.org>
From: "Thompson,Paul" <THOMPSOP [...] sanfordhealth.org>
Something that takes 4 hours or so is only free if your time is worth nothing. Paul A. Thompson, Ph.D. Director, Methodology and Data Analysis Center Sanford Research Rm 204, Delaware Bldg 900 W Delaware St Sioux Falls, SD 57104 Contact Information Telephone: 605-312-6016 Cell Line: 618-974-0473 Email: thompsop@sanfordhealth.org Show quoted text
-----Original Message----- From: autarch@urth.org via RT [mailto:bug-List-AllUtils@rt.cpan.org] Sent: Tuesday, August 18, 2009 11:06 AM To: Thompson,Paul Subject: RE: [rt.cpan.org #48806] Further note <URL: http://rt.cpan.org/Ticket/Display.html?id=48806 > On Tue, 18 Aug 2009, Thompson,Paul via RT wrote:
> Note that to install the CPAN::shell, about 30 other modules are required.
Yes, but you only have to do it once, and the modules are all free. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/ ----------------------------------------------------------------------- Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain privileged and confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Subject: RE: [rt.cpan.org #48806] Further note
Date: Tue, 18 Aug 2009 11:33:21 -0500
To: <bug-List-AllUtils [...] rt.cpan.org>
From: "Thompson,Paul" <THOMPSOP [...] sanfordhealth.org>
I did install CPAN::shell, and it has made the process much easier, as it installs prereqs. Paul A. Thompson, Ph.D. Director, Methodology and Data Analysis Center Sanford Research Rm 204, Delaware Bldg 900 W Delaware St Sioux Falls, SD 57104 Contact Information Telephone: 605-312-6016 Cell Line: 618-974-0473 Email: thompsop@sanfordhealth.org Show quoted text
-----Original Message----- From: autarch@urth.org via RT [mailto:bug-List-AllUtils@rt.cpan.org] Sent: Tuesday, August 18, 2009 10:19 AM To: Thompson,Paul Subject: RE: [rt.cpan.org #48806] Further note <URL: http://rt.cpan.org/Ticket/Display.html?id=48806 > On Tue, 18 Aug 2009, Thompson,Paul via RT wrote:
> I ran perl Build.PL. It said Looks good to everything. The package is still not installed. I have no idea how to do that.
http://search.cpan.org/~dagolden/Module-Build-0.340201/lib/Module/Build.pm -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/ ----------------------------------------------------------------------- Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain privileged and confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
This ticket looks to have been corrupted, and been merged with #48006! Resolving this ticket, as #48005 is now fixed in release 0.08 now on CPAN. Thanks Jess :)