WebService::ISBNDB::API::Books

WebService::ISBNDB::API::Books is a data class for book information.
Download

WebService::ISBNDB::API::Books Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Randy J. Ray
  • Publisher web site:
  • http://search.cpan.org/~rjray/WebService-ISBNDB-0.34/lib/WebService/ISBNDB/API/Subjects.pm

WebService::ISBNDB::API::Books Tags


WebService::ISBNDB::API::Books Description

WebService::ISBNDB::API::Books is a data class for book information. WebService::ISBNDB::API::Books is a data class for book information.SYNOPSIS use WebService::ISBNDB::API::Books; my $book = WebService::ISBNDB::API->new({ api_key => $key, isbn => '0596002068' });This class represents book data from isbndb.com. It is a sub-class of WebService::ISBNDB::API (see WebService::ISBNDB::API), and inherits all the attributes and methods from that class.METHODSThe following methods are specific to this class, or overridden from the super-class.ConstructorThe constructor for this class may take a single scalar argument in lieu of a hash reference:new($ISBN|$TITLE|$ARGS)This constructs a new object and returns a referent to it. If the parameter passed is a hash reference, it is handled as normal, per Class::Std mechanics. If the value is a scalar, it is tested to see if it is a valid ISBN (using the Business::ISBN module). If it is, it is used as a search key to find the corresponding book. If it is not a valid ISBN, it is assumed to be the title, and is likewise used as a search key. Since the title may return more than one match, the first matching record from the source is used to construct the object.If the argument is the hash-reference form, then a new object is always constructed; to perform searches see the search() and find() methods. Thus, the following two lines are in fact different: $book = WebService::ISBNDB::API::Books->new({ isbn => '0596002068' }); $book = WebService::ISBNDB::API::Books->new('0596002068');The first creates a new object that has only the isbn attribute set. The second returns a new object that represents the book with ISBN 0596002068, with all data present.The class also defines:copy($TARGET)Copies the target object into the calling object. All attributes (including the ID) are copied. This method is marked "CUMULATIVE" (see Class::Std), and any sub-class of this class should provide their own copy() and also mark it "CUMULATIVE", to ensure that all attributes at all levels are copied.See the copy() method in WebService::ISBNDB::API. Requirements: · Perl


WebService::ISBNDB::API::Books Related Software