line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Shared::Fixture::Wikibase::Datatype::Value::Item::Wikidata::WikidataEntity; |
2
|
|
|
|
|
|
|
|
3
|
12
|
|
|
12
|
|
331680
|
use base qw(Wikibase::Datatype::Value::Item); |
|
12
|
|
|
|
|
53
|
|
|
12
|
|
|
|
|
4587
|
|
4
|
12
|
|
|
12
|
|
80
|
use strict; |
|
12
|
|
|
|
|
26
|
|
|
12
|
|
|
|
|
205
|
|
5
|
12
|
|
|
12
|
|
53
|
use warnings; |
|
12
|
|
|
|
|
25
|
|
|
12
|
|
|
|
|
976
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = 0.31; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
4
|
|
|
4
|
1
|
153
|
my $class = shift; |
11
|
|
|
|
|
|
|
|
12
|
4
|
|
|
|
|
16
|
my @params = ( |
13
|
|
|
|
|
|
|
'value' => 'Q32753077', |
14
|
|
|
|
|
|
|
); |
15
|
|
|
|
|
|
|
|
16
|
4
|
|
|
|
|
45
|
my $self = $class->SUPER::new(@params); |
17
|
|
|
|
|
|
|
|
18
|
4
|
|
|
|
|
43
|
return $self; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__END__ |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=pod |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=encoding utf8 |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 NAME |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Test::Shared::Fixture::Wikibase::Datatype::Value::Item::WikidataEntity - Test instance for Wikidata item value. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SYNOPSIS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
use Test::Shared::Fixture::Wikibase::Datatype::Value::Item::WikidataEntity; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
my $obj = Test::Shared::Fixture::Wikibase::Datatype::Value::Item::WikidataEntity->new; |
38
|
|
|
|
|
|
|
my $type = $obj->type; |
39
|
|
|
|
|
|
|
my $value = $obj->value; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 METHODS |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head2 C<new> |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
my $obj = Test::Shared::Fixture::Wikibase::Datatype::Value::Item::WikidataEntity->new; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Constructor. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Returns instance of object. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 C<type> |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
my $type = $obj->type; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Get type. This is constant 'item'. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Returns string. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head2 C<value> |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
my $value = $obj->value; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Get value. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Returns string. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 EXAMPLE |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=for comment filename=fixture_create_and_print_value_item_wd_wikidataentity.pl |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
use strict; |
72
|
|
|
|
|
|
|
use warnings; |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
use Test::Shared::Fixture::Wikibase::Datatype::Value::Item::Wikidata::WikidataEntity; |
75
|
|
|
|
|
|
|
use Wikibase::Datatype::Print::Value::Item; |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
# Object. |
78
|
|
|
|
|
|
|
my $obj = Test::Shared::Fixture::Wikibase::Datatype::Value::Item::Wikidata::WikidataEntity->new; |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
# Print out. |
81
|
|
|
|
|
|
|
print scalar Wikibase::Datatype::Print::Value::Item::print($obj); |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
# Output: |
84
|
|
|
|
|
|
|
# Q32753077 |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
L<Wikibase::Datatype::Value::Item>. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 SEE ALSO |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=over |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=item L<Wikibase::Datatype> |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Wikibase datatypes. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=item L<Wikibase::Datatype::Value::Item> |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
Wikibase item value datatype. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=back |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 REPOSITORY |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
L<https://github.com/michal-josef-spacek/Wikibase-Datatype> |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head1 AUTHOR |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
Michal Josef Špaček L<mailto:skim@cpan.org> |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
L<http://skim.cz> |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
© 2020-2023 Michal Josef Špaček |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
BSD 2-Clause License |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head1 VERSION |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
0.31 |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=cut |