NAME
MARC::Convert::Wikidata::Object::ISBN - Bibliographic Wikidata object for ISBN number defined by MARC record.
SYNOPSIS
use MARC::Convert::Wikidata::Object::ISBN;
my $obj = MARC::Convert::Wikidata::Object::ISBN->new(%params);
my $cover = $obj->cover;
my $isbn = $obj->isbn;
my $publisher = $obj->publisher;
my $type = $obj->type;
METHODS
new
my $obj = MARC::Convert::Wikidata::Object::ISBN->new(%params);
Constructor.
Returns instance of object.
cover
ISBN cover.
Parameter is optional. Valid values are: hardback, paperback
Default value is undef.
isbn
ISBN number.
Parameter is required.
Default value is undef.
publisher
Publishing house object. Instance of MARC::Convert::Wikidata::Object::Publisher.
Default value is undef.
cover
my $cover = $obj->cover;
Get ISBN cover.
Returns string.
isbn
my $isbn = $obj->isbn;
Get ISBN number.
Returns string.
publisher
my $publisher = $obj->publisher;
Get publishing house name.
Returns instance of MARC::Convert::Wikidata::Object::Publisher.
type
my $type = $obj->type;
Get type of ISBN number (10 or 13 character length)
Returns number (10 or 13).
ERRORS
new():
Parameter 'isbn' is required.
ISBN '%s' isn't valid.
ISBN cover '%s' isn't valid.
From check_isa():
Parameter 'publisher' must be a 'MARC::Convert::Wikidata::Object::Publisher' object.
EXAMPLE1
use strict;
use warnings;
use Data::Printer;
use MARC::Convert::Wikidata::Object::ISBN;
use MARC::Convert::Wikidata::Object::Publisher;
my $obj = MARC::Convert::Wikidata::Object::ISBN->new(
'isbn' => '978-80-00-05046-1',
'publisher' => MARC::Convert::Wikidata::Object::Publisher->new(
'name' => 'Albatros',
),
);
p $obj;
# Output:
# MARC::Convert::Wikidata::Object::ISBN {
# Parents Mo::Object
# public methods (9) : BUILD, can (UNIVERSAL), DOES (UNIVERSAL), err (Error::Pure), check_isa (Mo::utils), check_required (Mo::utils), isa (UNIVERSAL), type, VERSION (UNIVERSAL)
# private methods (1) : __ANON__ (Mo::build)
# internals: {
# _isbn Business::ISBN13,
# isbn "978-80-00-05046-1",
# publisher MARC::Convert::Wikidata::Object::Publisher
# }
# }
DEPENDENCIES
Business::ISBN, Error::Pure, Mo, Mo::utils, List::Util, Readonly.
SEE ALSO
- MARC::Convert::Wikidata
-
Conversion class between MARC record and Wikidata object.
REPOSITORY
https://github.com/michal-josef-spacek/MARC-Convert-Wikidata-Object
AUTHOR
Michal Josef Špaček mailto:skim@cpan.org
LICENSE AND COPYRIGHT
© Michal Josef Špaček 2021-2023
BSD 2-Clause License
VERSION
0.03