line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::ReferenceURL::Fixture1; |
2
|
|
|
|
|
|
|
|
3
|
13
|
|
|
13
|
|
345464
|
use base qw(Wikibase::Datatype::Snak); |
|
13
|
|
|
|
|
68
|
|
|
13
|
|
|
|
|
4681
|
|
4
|
13
|
|
|
13
|
|
102
|
use strict; |
|
13
|
|
|
|
|
30
|
|
|
13
|
|
|
|
|
277
|
|
5
|
13
|
|
|
13
|
|
77
|
use warnings; |
|
13
|
|
|
|
|
31
|
|
|
13
|
|
|
|
|
362
|
|
6
|
|
|
|
|
|
|
|
7
|
13
|
|
|
13
|
|
4557
|
use Wikibase::Datatype::Value::String; |
|
13
|
|
|
|
|
43
|
|
|
13
|
|
|
|
|
1594
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = 0.30; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
5
|
|
|
5
|
1
|
157
|
my $class = shift; |
13
|
|
|
|
|
|
|
|
14
|
5
|
|
|
|
|
64
|
my @params = ( |
15
|
|
|
|
|
|
|
'datatype' => 'url', |
16
|
|
|
|
|
|
|
'datavalue' => Wikibase::Datatype::Value::String->new( |
17
|
|
|
|
|
|
|
'value' => 'https://skim.cz', |
18
|
|
|
|
|
|
|
), |
19
|
|
|
|
|
|
|
'property' => 'P854', |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
5
|
|
|
|
|
79
|
my $self = $class->SUPER::new(@params); |
23
|
|
|
|
|
|
|
|
24
|
5
|
|
|
|
|
73
|
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::ReferenceURL::Fixture1 - Test instance for Wikidata snak. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 SYNOPSIS |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
use Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::ReferenceURL::Fixture1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
my $obj = Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::ReferenceURL::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::ReferenceURL::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_reference_url_fixture1.pl |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
use strict; |
96
|
|
|
|
|
|
|
use warnings; |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
use Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::ReferenceURL::Fixture1; |
99
|
|
|
|
|
|
|
use Wikibase::Datatype::Print::Snak; |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
# Object. |
102
|
|
|
|
|
|
|
my $obj = Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::ReferenceURL::Fixture1->new; |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
# Print out. |
105
|
|
|
|
|
|
|
print scalar Wikibase::Datatype::Print::Snak::print($obj); |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
# Output: |
108
|
|
|
|
|
|
|
# P854: https://skim.cz |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
L<Wikibase::Datatype::Snak>, |
113
|
|
|
|
|
|
|
L<Wikibase::Datatype::Value::String>. |
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 |