line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::Image::Dog; |
2
|
|
|
|
|
|
|
|
3
|
25
|
|
|
25
|
|
341196
|
use base qw(Wikibase::Datatype::Snak); |
|
25
|
|
|
|
|
93
|
|
|
25
|
|
|
|
|
5528
|
|
4
|
25
|
|
|
25
|
|
185
|
use strict; |
|
25
|
|
|
|
|
60
|
|
|
25
|
|
|
|
|
595
|
|
5
|
25
|
|
|
25
|
|
150
|
use warnings; |
|
25
|
|
|
|
|
92
|
|
|
25
|
|
|
|
|
705
|
|
6
|
|
|
|
|
|
|
|
7
|
25
|
|
|
25
|
|
3994
|
use Wikibase::Datatype::Value::String; |
|
25
|
|
|
|
|
91
|
|
|
25
|
|
|
|
|
3629
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = 0.29; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
17
|
|
|
17
|
1
|
173
|
my $class = shift; |
13
|
|
|
|
|
|
|
|
14
|
17
|
|
|
|
|
153
|
my @params = ( |
15
|
|
|
|
|
|
|
'datatype' => 'commonsMedia', |
16
|
|
|
|
|
|
|
'datavalue' => Wikibase::Datatype::Value::String->new( |
17
|
|
|
|
|
|
|
'value' => 'Canadian Inuit Dog.jpg', |
18
|
|
|
|
|
|
|
), |
19
|
|
|
|
|
|
|
'property' => 'P18', |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
17
|
|
|
|
|
327
|
my $self = $class->SUPER::new(@params); |
23
|
|
|
|
|
|
|
|
24
|
17
|
|
|
|
|
190
|
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::Image::Dog - Test instance for Wikidata snak. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 SYNOPSIS |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
use Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::Image::Dog; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
my $obj = Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::Image::Dog->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::Image::Dog->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_image_dog.pl |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
use strict; |
96
|
|
|
|
|
|
|
use warnings; |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
use Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::Image::Dog; |
99
|
|
|
|
|
|
|
use Wikibase::Datatype::Print::Snak; |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
# Object. |
102
|
|
|
|
|
|
|
my $obj = Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::Image::Dog->new; |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
# Print out. |
105
|
|
|
|
|
|
|
print scalar Wikibase::Datatype::Print::Snak::print($obj); |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
# Output: |
108
|
|
|
|
|
|
|
# P18: Canadian Inuit Dog.jpg |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
L<Wikibase::Datatype::Snak>. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 SEE ALSO |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=over |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=item L<Wikibase::Datatype> |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Wikibase datatypes. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=item L<Wikibase::Datatype::Snak> |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
Wikibase snak datatype. |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=back |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=head1 REPOSITORY |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
L<https://github.com/michal-josef-spacek/Wikibase-Datatype> |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=head1 AUTHOR |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
Michal Josef Špaček L<mailto:skim@cpan.org> |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
L<http://skim.cz> |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
© Michal Josef Špaček 2020-2023 |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
BSD 2-Clause License |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=head1 VERSION |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
0.29 |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=cut |