NAME
MARC::Convert::Wikidata::Object::Publisher - Bibliographic Wikidata object for publisher defined by MARC record.
SYNOPSIS
use MARC::Convert::Wikidata::Object::Publisher;
my $obj = MARC::Convert::Wikidata::Object::Publisher->new(%params);
my $external_ids_ar = $obj->external_ids;
my $id = $obj->id;
my $name = $obj->name;
my $place = $obj->place;
METHODS
new
my $obj = MARC::Convert::Wikidata::Object::Publisher->new(%params);
Constructor.
Returns instance of object.
external_ids
External ids.
Need to be a reference to array with MARC::Convert::Wikidata::Object::ExternalId instances.
Default value is [].
id
Id of publishing house.
Parameter is optional.
Default value is undef.
name
Name of publishing house.
Parameter is required.
Default value is undef.
place
Location of publishing house.
Default value is undef.
external_ids
my $external_ids_ar = $obj->external_ids;
Get list of external ids.
Returns reference to array with MARC::Convert::Wikidata::Object::ExternalId instances.
id
my $id = $obj->id;
Get id of publishing house.
Returns string.
name
my $name = $obj->name;
Get name of publishing house.
Returns string.
place
my $place = $obj->place;
Get place of publishing house.
Returns string.
ERRORS
new():
External id isn't 'MARC::Convert::Wikidata::Object::ExternalId' object.
Parameter 'external_ids' must be a array.
Parameter 'name' is required.
EXAMPLE1
use strict;
use warnings;
use Data::Printer;
use MARC::Convert::Wikidata::Object::ExternalId;
use MARC::Convert::Wikidata::Object::Publisher;
my $obj = MARC::Convert::Wikidata::Object::Publisher->new(
'external_ids' => [
MARC::Convert::Wikidata::Object::ExternalId->new(
'name' => 'nkcr_aut',
'value' => 'ko2002101950',
),
],
'id' => '000010003',
'name' => 'Academia',
'place' => 'Praha',
);
p $obj;
# Output:
# MARC::Convert::Wikidata::Object::Publisher {
# parents: Mo::Object
# public methods (2):
# BUILD
# Mo::utils:
# check_required
# private methods (0)
# internals: {
# external_ids [
# [0] MARC::Convert::Wikidata::Object::ExternalId
# ],
# id "000010003" (dualvar: 10003),
# name "Academia",
# place "Praha"
# }
# }
DEPENDENCIES
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-2025
BSD 2-Clause License
VERSION
0.13