File Coverage

blib/lib/Test/Shared/Fixture/Wikibase/Datatype/Value/Item/Wikidata/Human.pm
Criterion Covered Total %
statement 13 13 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 18 18 100.0


line stmt bran cond sub pod time code
1             package Test::Shared::Fixture::Wikibase::Datatype::Value::Item::Wikidata::Human;
2              
3 13     13   343070 use base qw(Wikibase::Datatype::Value::Item);
  13         58  
  13         3323  
4 13     13   93 use strict;
  13         28  
  13         297  
5 13     13   71 use warnings;
  13         34  
  13         1331  
6              
7             our $VERSION = 0.29;
8              
9             sub new {
10 5     5 1 133 my $class = shift;
11              
12 5         22 my @params = (
13             'value' => 'Q5',
14             );
15              
16 5         50 my $self = $class->SUPER::new(@params);
17              
18 5         66 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::Wikidata::Human - Test instance for Wikidata item value.
32              
33             =head1 SYNOPSIS
34              
35             use Test::Shared::Fixture::Wikibase::Datatype::Value::Item::Wikidata::Human;
36              
37             my $obj = Test::Shared::Fixture::Wikibase::Datatype::Value::Item::Wikidata::Human->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::Wikidata::Human->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_human.pl
70              
71             use strict;
72             use warnings;
73              
74             use Test::Shared::Fixture::Wikibase::Datatype::Value::Item::Wikidata::Human;
75             use Wikibase::Datatype::Print::Value::Item;
76              
77             # Object.
78             my $obj = Test::Shared::Fixture::Wikibase::Datatype::Value::Item::Wikidata::Human->new;
79              
80             # Print out.
81             print scalar Wikibase::Datatype::Print::Value::Item::print($obj);
82              
83             # Output:
84             # Q5
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.29
123              
124             =cut