MARC::Convert::Wikidata::Object::People - Bibliographic Wikidata object for people defined by MARC record.
use MARC::Convert::Wikidata::Object::People; my $obj = MARC::Convert::Wikidata::Object::People->new(%params); my $date_of_birth = $obj->date_of_birth; my $date_of_death = $obj->date_of_death; my $name = $obj->name; my $nkcr_aut = $obj->nkcr_aut; my $surname = $obj->surname;
new
my $obj = MARC::Convert::Wikidata::Object::People->new(%params);
Constructor.
Returns instance of object.
date_of_birth
Date of birth of people.
Parameter is string with date. See "check_date" in Mo::utils::Date for more information.
Default value is undef.
date_of_death
Date of death of people.
name
Given name of people.
nkcr_aut
ID in National library of the Czech Republic authority database.
surname
Surname of people.
my $date_of_birth = $obj->date_of_birth;
Get date of birth.
Returns string.
my $date_of_death = $obj->date_of_death;
Get date of death.
my $name = $obj->name;
Get given name.
my $nkcr_aut = $obj->nkcr_aut;
Get ID from National Library of the Czech Republic authority database.
my $surname = $obj->surname;
Get surname.
new(): From Mo::utils::Date::check_date(): Parameter 'date_of_birth' for date is in bad format. Parameter 'date_of_birth' has year greater than actual year. Parameter 'date_of_death' for date is in bad format. Parameter 'date_of_death' has year greater than actual year. From Mo::utils::Date::check_date_order(): Parameter 'date_of_birth' has date greater or same as parameter 'date_of_death' date.
use strict; use warnings; use Data::Printer; use MARC::Convert::Wikidata::Object::People; use Unicode::UTF8 qw(decode_utf8); my $obj = MARC::Convert::Wikidata::Object::People->new( 'date_of_birth' => '1952-12-08', 'name' => decode_utf8('Jiří'), 'nkcr_aut' => 'jn20000401266', 'surname' => 'Jurok', ); p $obj; # Output: # MARC::Convert::Wikidata::Object::People { # Parents Mo::Object # public methods (7) : BUILD, can (UNIVERSAL), DOES (UNIVERSAL), err (Error::Pure), check_date (Mo::utils::Date), isa (UNIVERSAL), VERSION (UNIVERSAL) # private methods (1) : __ANON__ (Mo::build) # internals: { # date_of_birth "1952-12-08", # name "Jiří", # nkcr_aut "jn20000401266", # surname "Jurok" # } # }
Mo, Mo::utils::Date.
Conversion class between MARC record and Wikidata object.
https://github.com/michal-josef-spacek/MARC-Convert-Wikidata-Object
Michal Josef Špaček mailto:skim@cpan.org
http://skim.cz
© Michal Josef Špaček 2021-2023
BSD 2-Clause License
0.03
To install MARC::Convert::Wikidata::Object, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MARC::Convert::Wikidata::Object
CPAN shell
perl -MCPAN -e shell install MARC::Convert::Wikidata::Object
For more information on module installation, please visit the detailed CPAN module installation guide.