File Coverage

blib/lib/Test/Shared/Fixture/Wikibase/Datatype/Snak/Wikidata/NumberOfLimbs/FourTolerance.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 1 1 100.0
total 22 22 100.0


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