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