NAME

MARC::Convert::Wikidata::Object::People - Bibliographic Wikidata object for people defined by MARC record.

SYNOPSIS

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;

METHODS

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.

    Parameter is string with date. See "check_date" in Mo::utils::Date for more information.

    Default value is undef.

  • name

    Given name of people.

    Default value is undef.

  • nkcr_aut

    ID in National library of the Czech Republic authority database.

    Default value is undef.

  • surname

    Surname of people.

    Default value is undef.

date_of_birth

my $date_of_birth = $obj->date_of_birth;

Get date of birth.

Returns string.

date_of_death

my $date_of_death = $obj->date_of_death;

Get date of death.

Returns string.

name

my $name = $obj->name;

Get given name.

Returns string.

nkcr_aut

my $nkcr_aut = $obj->nkcr_aut;

Get ID from National Library of the Czech Republic authority database.

Returns string.

surname

my $surname = $obj->surname;

Get surname.

Returns string.

ERRORS

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.

EXAMPLE1

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"
#     }
# }

DEPENDENCIES

Mo, Mo::utils::Date.

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

http://skim.cz

LICENSE AND COPYRIGHT

© Michal Josef Špaček 2021-2023

BSD 2-Clause License

VERSION

0.03