line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Kramerius::Object; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
83651
|
use strict; |
|
8
|
|
|
|
|
28
|
|
|
8
|
|
|
|
|
235
|
|
4
|
8
|
|
|
8
|
|
38
|
use warnings; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
238
|
|
5
|
|
|
|
|
|
|
|
6
|
8
|
|
|
8
|
|
3859
|
use Mo qw(is required); |
|
8
|
|
|
|
|
4416
|
|
|
8
|
|
|
|
|
42
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = 0.05; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has id => ( |
11
|
|
|
|
|
|
|
is => 'ro', |
12
|
|
|
|
|
|
|
required => 1, |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has name => ( |
16
|
|
|
|
|
|
|
is => 'ro', |
17
|
|
|
|
|
|
|
required => 1, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has url => ( |
21
|
|
|
|
|
|
|
is => 'ro', |
22
|
|
|
|
|
|
|
required => 1, |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has version => ( |
26
|
|
|
|
|
|
|
is => 'ro', |
27
|
|
|
|
|
|
|
required => 1, |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=pod |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=encoding utf8 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Data::Kramerius::Object - Data object for kramerius instance. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 SYNOPSIS |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
use Data::Kramerius::Object; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
my $obj = Data::Kramerius::Object->new(%params); |
47
|
|
|
|
|
|
|
my $id = $obj->id; |
48
|
|
|
|
|
|
|
my $name = $obj->name; |
49
|
|
|
|
|
|
|
my $url = $obj->url; |
50
|
|
|
|
|
|
|
my $version = $obj->version; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 METHODS |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head2 C<new> |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
my $obj = Data::Kramerius::Object->new(%params); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Constructor. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Returns instance of object. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=over 8 |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=item * C<id> |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Id of Kramerius system. |
67
|
|
|
|
|
|
|
It's required. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=item * C<name> |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Name of Kramerius system. |
72
|
|
|
|
|
|
|
It's required. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=item * C<url> |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
URL of Kramerius system. |
77
|
|
|
|
|
|
|
It's required. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=item * C<version> |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Version of Kramerius system. |
82
|
|
|
|
|
|
|
It's required. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=back |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head2 C<id> |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
my $id = $obj->id; |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Get id of Kramerius system. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Returns string. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 C<name> |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
my $name = $obj->name; |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Get name of Kramerius system. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
Returns string. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head2 C<url> |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
my $url = $obj->url; |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Get URL of Kramerius system. |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Returns string. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head2 C<version> |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
my $version = $obj->version; |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Get version of Kramerius system. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Returns number. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 EXAMPLE |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
use strict; |
121
|
|
|
|
|
|
|
use warnings; |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
use Data::Kramerius::Object; |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
my $obj = Data::Kramerius::Object->new( |
126
|
|
|
|
|
|
|
'id' => 'foo', |
127
|
|
|
|
|
|
|
'name' => 'Foo Kramerius', |
128
|
|
|
|
|
|
|
'url' => 'https://foo.example.com', |
129
|
|
|
|
|
|
|
'version' => 4, |
130
|
|
|
|
|
|
|
); |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
# Print out. |
133
|
|
|
|
|
|
|
print 'Id: '.$obj->id."\n"; |
134
|
|
|
|
|
|
|
print 'Name: '.$obj->name."\n"; |
135
|
|
|
|
|
|
|
print 'URL: '.$obj->url."\n"; |
136
|
|
|
|
|
|
|
print 'Version: '.$obj->version."\n"; |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
# Output: |
139
|
|
|
|
|
|
|
# Id: foo |
140
|
|
|
|
|
|
|
# Name: Foo Kramerius |
141
|
|
|
|
|
|
|
# URL: https://foo.example.com |
142
|
|
|
|
|
|
|
# Version: 4 |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
L<Mo>. |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=head1 REPOSITORY |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
L<https://github.com/michal-josef-spacek/Data-Kramerius> |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=head1 AUTHOR |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
Michal Josef Špaček L<mailto:skim@cpan.org> |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
L<http://skim.cz> |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
© 2021 Michal Josef Špaček |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
BSD 2-Clause License |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=head1 VERSION |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
0.05 |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=cut |