line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::DouglasAdams; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
498036
|
use base qw(Wikibase::Datatype::Item); |
|
3
|
|
|
|
|
37
|
|
|
3
|
|
|
|
|
1611
|
|
4
|
3
|
|
|
3
|
|
20
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
71
|
|
5
|
3
|
|
|
3
|
|
14
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
68
|
|
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
1299
|
use Test::Shared::Fixture::Wikibase::Datatype::Statement::Wikidata::GivenName::Douglas; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
94
|
|
8
|
3
|
|
|
3
|
|
1481
|
use Test::Shared::Fixture::Wikibase::Datatype::Statement::Wikidata::InstanceOf::Human; |
|
3
|
|
|
|
|
12
|
|
|
3
|
|
|
|
|
104
|
|
9
|
3
|
|
|
3
|
|
1318
|
use Test::Shared::Fixture::Wikibase::Datatype::Statement::Wikidata::SexOrGender::Male; |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
89
|
|
10
|
3
|
|
|
3
|
|
19
|
use Wikibase::Datatype::Value::Monolingual; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
367
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = 0.31; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
1
|
|
|
1
|
1
|
215
|
my $class = shift; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
|
|
18
|
my @params = ( |
18
|
|
|
|
|
|
|
'aliases' => [ |
19
|
|
|
|
|
|
|
Wikibase::Datatype::Value::Monolingual->new( |
20
|
|
|
|
|
|
|
'language' => 'en', |
21
|
|
|
|
|
|
|
'value' => 'Douglas Noel Adams', |
22
|
|
|
|
|
|
|
), |
23
|
|
|
|
|
|
|
], |
24
|
|
|
|
|
|
|
'descriptions' => [ |
25
|
|
|
|
|
|
|
Wikibase::Datatype::Value::Monolingual->new( |
26
|
|
|
|
|
|
|
'language' => 'en', |
27
|
|
|
|
|
|
|
'value' => 'English writer and humorist (1952-2001)', |
28
|
|
|
|
|
|
|
), |
29
|
|
|
|
|
|
|
], |
30
|
|
|
|
|
|
|
'labels' => [ |
31
|
|
|
|
|
|
|
Wikibase::Datatype::Value::Monolingual->new( |
32
|
|
|
|
|
|
|
'language' => 'en', |
33
|
|
|
|
|
|
|
'value' => 'Douglas Adams', |
34
|
|
|
|
|
|
|
), |
35
|
|
|
|
|
|
|
], |
36
|
|
|
|
|
|
|
'lastrevid' => 1645190860, |
37
|
|
|
|
|
|
|
'modified' => '2022-06-24T13:34:10Z', |
38
|
|
|
|
|
|
|
'ns' => 0, |
39
|
|
|
|
|
|
|
'statements' => [ |
40
|
|
|
|
|
|
|
Test::Shared::Fixture::Wikibase::Datatype::Statement::Wikidata::InstanceOf::Human->new, |
41
|
|
|
|
|
|
|
Test::Shared::Fixture::Wikibase::Datatype::Statement::Wikidata::SexOrGender::Male->new, |
42
|
|
|
|
|
|
|
Test::Shared::Fixture::Wikibase::Datatype::Statement::Wikidata::GivenName::Douglas->new, |
43
|
|
|
|
|
|
|
], |
44
|
|
|
|
|
|
|
'title' => 'Q42', |
45
|
|
|
|
|
|
|
); |
46
|
|
|
|
|
|
|
|
47
|
1
|
|
|
|
|
9
|
my $self = $class->SUPER::new(@params); |
48
|
|
|
|
|
|
|
|
49
|
1
|
|
|
|
|
10
|
return $self; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=pod |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=encoding utf8 |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 NAME |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::DouglasAdams - Test instance for Wikidata item. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 SYNOPSIS |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
use Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::DouglasAdams; |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
my $obj = Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::DouglasAdams->new; |
69
|
|
|
|
|
|
|
my $aliases_ar = $obj->aliases; |
70
|
|
|
|
|
|
|
my $descriptions_ar = $obj->descriptions; |
71
|
|
|
|
|
|
|
my $id = $obj->id; |
72
|
|
|
|
|
|
|
my $labels_ar = $obj->labels; |
73
|
|
|
|
|
|
|
my $lastrevid = $obj->lastrevid; |
74
|
|
|
|
|
|
|
my $modified = $obj->modified; |
75
|
|
|
|
|
|
|
my $ns = $obj->ns; |
76
|
|
|
|
|
|
|
my $page_id = $obj->page_id; |
77
|
|
|
|
|
|
|
my $sitelinks_ar = $obj->sitelinks; |
78
|
|
|
|
|
|
|
my $statements_ar = $obj->statements; |
79
|
|
|
|
|
|
|
my $title = $obj->title; |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 METHODS |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head2 C<new> |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
my $obj = Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::DouglasAdams->new; |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Constructor. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Returns instance of object. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head2 C<aliases> |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
my $aliases_ar = $obj->aliases; |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Get aliases. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Returns reference to array with Wikibase::Datatype::Value::Monolingual instances. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head2 C<descriptions> |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
my $descriptions_ar = $obj->descriptions; |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Get descriptions. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Returns reference to array with Wikibase::Datatype::Value::Monolingual instances. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head2 C<id> |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
my $id = $obj->id; |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Get id. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Returns string. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head2 C<labels> |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
my $labels_ar = $obj->labels; |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Get labels. |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Returns reference to array with Wikibase::Datatype::Value::Monolingual instances. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head2 C<lastrevid> |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
my $lastrevid = $obj->lastrevid; |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
Get last revision ID. |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Returns string. |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=head2 C<modified> |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
my $modified = $obj->modified; |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
Get date of modification. |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
Returns string. |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head2 C<ns> |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
my $ns = $obj->ns; |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
Get namespace. |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Returns number. |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head2 C<page_id> |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
my $page_id = $obj->page_id; |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
Get page id. |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
Returns number. |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=head2 C<sitelinks> |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
my $sitelinks_ar = $obj->sitelinks; |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
Get sitelinks. |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
Returns reference to array with Wikibase::Datatype::Sitelink instances. |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=head2 C<statements> |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
my $statements_ar = $obj->statements; |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
Get statements. |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
Returns reference to array with Wikibase::Datatype::Statement instances. |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
=head2 C<title> |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
my $title = $obj->title; |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
Get title. |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
Returns string. |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
=head1 EXAMPLE |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
=for comment filename=fixture_create_and_print_item_wd_douglas_adams.pl |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
use strict; |
184
|
|
|
|
|
|
|
use warnings; |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
use Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::DouglasAdams; |
187
|
|
|
|
|
|
|
use Wikibase::Datatype::Print::Item; |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
# Object. |
190
|
|
|
|
|
|
|
my $obj = Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::DouglasAdams->new; |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
# Print out. |
193
|
|
|
|
|
|
|
print scalar Wikibase::Datatype::Print::Item::print($obj); |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
# Output: |
196
|
|
|
|
|
|
|
# Label: Douglas Adams (en) |
197
|
|
|
|
|
|
|
# Description: English writer and humorist (1952-2001) (en) |
198
|
|
|
|
|
|
|
# Aliases: |
199
|
|
|
|
|
|
|
# Douglas Noel Adams (en) |
200
|
|
|
|
|
|
|
# Statements: |
201
|
|
|
|
|
|
|
# P31: Q5 (normal) |
202
|
|
|
|
|
|
|
# References: |
203
|
|
|
|
|
|
|
# { |
204
|
|
|
|
|
|
|
# P248: Q53919 |
205
|
|
|
|
|
|
|
# P214: 113230702 |
206
|
|
|
|
|
|
|
# P813: 7 December 2013 (Q1985727) |
207
|
|
|
|
|
|
|
# } |
208
|
|
|
|
|
|
|
# P21: Q6581097 (normal) |
209
|
|
|
|
|
|
|
# References: |
210
|
|
|
|
|
|
|
# { |
211
|
|
|
|
|
|
|
# P854: https://skim.cz |
212
|
|
|
|
|
|
|
# P813: 7 December 2013 (Q1985727) |
213
|
|
|
|
|
|
|
# } |
214
|
|
|
|
|
|
|
# { |
215
|
|
|
|
|
|
|
# P248: Q53919 |
216
|
|
|
|
|
|
|
# P214: 113230702 |
217
|
|
|
|
|
|
|
# P813: 7 December 2013 (Q1985727) |
218
|
|
|
|
|
|
|
# } |
219
|
|
|
|
|
|
|
# P735: Q463035 (normal) |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
L<Test::Shared::Fixture::Wikibase::Datatype::Statement::Wikidata::GivenName::Douglas>, |
224
|
|
|
|
|
|
|
L<Test::Shared::Fixture::Wikibase::Datatype::Statement::Wikidata::InstanceOf::Human>, |
225
|
|
|
|
|
|
|
L<Test::Shared::Fixture::Wikibase::Datatype::Statement::Wikidata::SexOrGender::Male>, |
226
|
|
|
|
|
|
|
L<Wikibase::Datatype::Item>, |
227
|
|
|
|
|
|
|
L<Wikibase::Datatype::Value::Monolingual>. |
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
=head1 SEE ALSO |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
=over |
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
=item L<Wikibase::Datatype> |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
Wikibase datatypes. |
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
=item L<Wikibase::Datatype::Item> |
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
Wikibase item datatype. |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
=back |
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
=head1 REPOSITORY |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
L<https://github.com/michal-josef-spacek/Wikibase-Datatype> |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
=head1 AUTHOR |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
Michal Josef Špaček L<mailto:skim@cpan.org> |
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
L<http://skim.cz> |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
© 2020-2023 Michal Josef Špaček |
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
BSD 2-Clause License |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
=head1 VERSION |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
0.31 |
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
=cut |