line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::StatedIn::VIAF; |
2
|
|
|
|
|
|
|
|
3
|
38
|
|
|
38
|
|
344235
|
use base qw(Wikibase::Datatype::Snak); |
|
38
|
|
|
|
|
135
|
|
|
38
|
|
|
|
|
5446
|
|
4
|
38
|
|
|
38
|
|
303
|
use strict; |
|
38
|
|
|
|
|
99
|
|
|
38
|
|
|
|
|
891
|
|
5
|
38
|
|
|
38
|
|
209
|
use warnings; |
|
38
|
|
|
|
|
685
|
|
|
38
|
|
|
|
|
1107
|
|
6
|
|
|
|
|
|
|
|
7
|
38
|
|
|
38
|
|
18366
|
use Test::Shared::Fixture::Wikibase::Datatype::Value::Item::Wikidata::VIAF; |
|
38
|
|
|
|
|
135
|
|
|
38
|
|
|
|
|
3926
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = 0.29; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
23
|
|
|
23
|
1
|
228
|
my $class = shift; |
13
|
|
|
|
|
|
|
|
14
|
23
|
|
|
|
|
237
|
my @params = ( |
15
|
|
|
|
|
|
|
'datatype' => 'wikibase-item', |
16
|
|
|
|
|
|
|
'datavalue' => Test::Shared::Fixture::Wikibase::Datatype::Value::Item::Wikidata::VIAF->new, |
17
|
|
|
|
|
|
|
'property' => 'P248', |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
23
|
|
|
|
|
178
|
my $self = $class->SUPER::new(@params); |
21
|
|
|
|
|
|
|
|
22
|
23
|
|
|
|
|
385
|
return $self; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=pod |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=encoding utf8 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 NAME |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::StatedIn::VIAF - Test instance for Wikidata snak. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 SYNOPSIS |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
use Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::StatedIn::VIAF; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
my $obj = Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::StatedIn::VIAF->new; |
42
|
|
|
|
|
|
|
my $datatype = $obj->datatype; |
43
|
|
|
|
|
|
|
my $datavalue = $obj->datavalue; |
44
|
|
|
|
|
|
|
my $property = $obj->property; |
45
|
|
|
|
|
|
|
my $snaktype = $obj->snaktype; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 METHODS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head2 C<new> |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
my $obj = Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::StatedIn::VIAF->new; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Constructor. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Returns instance of object. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head2 C<datatype> |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
my $datatype = $obj->datatype; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Get data type. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Returns string. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head2 C<datavalue> |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
my $datavalue = $obj->datavalue; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Get data value. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Returns instance of Wikibase::Datatype::Value. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head2 C<property> |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
my $property = $obj->property; |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Get property name. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Returns string. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head2 C<snaktype> |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
my $snaktype = $obj->snaktype; |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Get snak type. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Returns string. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 EXAMPLE |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=for comment filename=fixture_create_and_print_snak_wd_stated_in_viaf.pl |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
use strict; |
94
|
|
|
|
|
|
|
use warnings; |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
use Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::StatedIn::VIAF; |
97
|
|
|
|
|
|
|
use Wikibase::Datatype::Print::Snak; |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
# Object. |
100
|
|
|
|
|
|
|
my $obj = Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::StatedIn::VIAF->new; |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
# Print out. |
103
|
|
|
|
|
|
|
print scalar Wikibase::Datatype::Print::Snak::print($obj); |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
# Output: |
106
|
|
|
|
|
|
|
# P248: Q53919 |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
L<Test::Shared::Fixture::Wikibase::Datatype::Value::Item::Wikidata::VIAF>, |
111
|
|
|
|
|
|
|
L<Wikibase::Datatype::Snak>. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head1 SEE ALSO |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=over |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=item L<Wikibase::Datatype> |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Wikibase datatypes. |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=item L<Wikibase::Datatype::Snak> |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Wikibase snak datatype. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=back |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head1 REPOSITORY |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
L<https://github.com/michal-josef-spacek/Wikibase-Datatype> |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=head1 AUTHOR |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
Michal Josef Špaček L<mailto:skim@cpan.org> |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
L<http://skim.cz> |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
© Michal Josef Špaček 2020-2023 |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
BSD 2-Clause License |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=head1 VERSION |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
0.29 |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=cut |