The Perl Advent Calendar needs more articles for 2022. Submit your idea today!

NAME

Data::Kramerius::Object - Data object for kramerius instance.

SYNOPSIS

 use Data::Kramerius::Object;

 my $obj = Data::Kramerius::Object->new(%params);
 my $id = $obj->id;
 my $name = $obj->name;
 my $url = $obj->url;
 my $version = $obj->version;

METHODS

new

 my $obj = Data::Kramerius::Object->new(%params);

Constructor.

Returns instance of object.

  • id

    Id of Kramerius system. It's required.

  • name

    Name of Kramerius system. It's required.

  • url

    URL of Kramerius system. It's required.

  • version

    Version of Kramerius system. It's required.

id

 my $id = $obj->id;

Get id of Kramerius system.

Returns string.

name

 my $name = $obj->name;

Get name of Kramerius system.

Returns string.

url

 my $url = $obj->url;

Get URL of Kramerius system.

Returns string.

version

 my $version = $obj->version;

Get version of Kramerius system.

Returns number.

EXAMPLE

 use strict;
 use warnings;

 use Data::Kramerius::Object;

 my $obj = Data::Kramerius::Object->new(
         'id' => 'foo',
         'name' => 'Foo Kramerius',
         'url' => 'https://foo.example.com',
         'version' => 4,
 );

 # Print out.
 print 'Id: '.$obj->id."\n";
 print 'Name: '.$obj->name."\n";
 print 'URL: '.$obj->url."\n";
 print 'Version: '.$obj->version."\n";

 # Output:
 # Id: foo
 # Name: Foo Kramerius
 # URL: https://foo.example.com
 # Version: 4

DEPENDENCIES

Mo.

REPOSITORY

https://github.com/michal-josef-spacek/Data-Kramerius

AUTHOR

Michal Josef Špaček mailto:skim@cpan.org

http://skim.cz

LICENSE AND COPYRIGHT

© 2021 Michal Josef Špaček

BSD 2-Clause License

VERSION

0.05