File Coverage

blib/lib/Test/Shared/Fixture/Wikibase/Datatype/Statement/Wikidata/GivenName/Douglas.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::Statement::Wikidata::GivenName::Douglas;
2              
3 6     6   345122 use base qw(Wikibase::Datatype::Statement);
  6         46  
  6         2680  
4 6     6   46 use strict;
  6         14  
  6         139  
5 6     6   32 use warnings;
  6         23  
  6         153  
6              
7 6     6   3148 use Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::GivenName::Douglas;
  6         23  
  6         654  
8              
9             our $VERSION = 0.30;
10              
11             sub new {
12 2     2 1 130 my $class = shift;
13              
14 2         28 my @params = (
15             'snak' => Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::GivenName::Douglas->new,
16             );
17              
18 2         17 my $self = $class->SUPER::new(@params);
19              
20 2         26 return $self;
21             }
22              
23             1;
24              
25             __END__
26              
27             =pod
28              
29             =encoding utf8
30              
31             =head1 NAME
32              
33             Test::Shared::Fixture::Wikibase::Datatype::Statement::Wikidata::GivenName::Douglas - Test instance for Wikidata statement.
34              
35             =head1 SYNOPSIS
36              
37             use Test::Shared::Fixture::Wikibase::Datatype::Statement::Wikidata::GivenName::Douglas;
38              
39             my $obj = Test::Shared::Fixture::Wikibase::Datatype::Statement::Wikidata::GivenName::Douglas->new(%params);
40             my $id = $obj->id;
41             my $property_snaks_ar = $obj->property_snaks;
42             my $rank = $obj->rank;
43             my $referenes_ar = $obj->references;
44             my $snak = $obj->snak;
45              
46             =head1 METHODS
47              
48             =head2 C<new>
49              
50             my $obj = Test::Shared::Fixture::Wikibase::Datatype::Statement::Wikidata::GivenName::Douglas->new(%params);
51              
52             Constructor.
53              
54             Returns instance of object.
55              
56             =head2 C<id>
57              
58             my $id = $obj->id;
59              
60             Get id of statement.
61              
62             Returns string.
63              
64             =head2 C<property_snaks>
65              
66             my $property_snaks_ar = $obj->property_snaks;
67              
68             Get property snaks.
69              
70             Returns reference to array with Wikibase::Datatype::Snak instances.
71              
72             =head2 C<rank>
73              
74             my $rank = $obj->rank;
75              
76             Get rank value.
77              
78             =head2 C<references>
79              
80             my $referenes_ar = $obj->references;
81              
82             Get references.
83              
84             Returns reference to array with Wikibase::Datatype::Reference instance.
85              
86             =head2 C<snak>
87              
88             my $snak = $obj->snak;
89              
90             Get main snak.
91              
92             Returns Wikibase::Datatype::Snak instance.
93              
94             =head1 EXAMPLE
95              
96             =for comment filename=fixture_create_and_print_statement_wd_given_name_douglas.pl
97              
98             use strict;
99             use warnings;
100              
101             use Test::Shared::Fixture::Wikibase::Datatype::Statement::Wikidata::GivenName::Douglas;
102             use Wikibase::Datatype::Print::Statement;
103              
104             # Object.
105             my $obj = Test::Shared::Fixture::Wikibase::Datatype::Statement::Wikidata::GivenName::Douglas->new;
106              
107             # Print out.
108             print scalar Wikibase::Datatype::Print::Statement::print($obj);
109              
110             # Output:
111             # P735: Q463035 (normal)
112              
113             =head1 DEPENDENCIES
114              
115             L<Test::Shared::Fixture::Wikibase::Datatype::Snak::Wikidata::GivenName::Douglas>,
116             L<Wikibase::Datatype::Statement>.
117              
118             =head1 SEE ALSO
119              
120             =over
121              
122             =item L<Wikibase::Datatype>
123              
124             Wikibase datatypes.
125              
126             =item L<Wikibase::Datatype::Statement>
127              
128             Wikibase statement datatype.
129              
130             =back
131              
132             =head1 REPOSITORY
133              
134             L<https://github.com/michal-josef-spacek/Wikibase-Datatype>
135              
136             =head1 AUTHOR
137              
138             Michal Josef Špaček L<mailto:skim@cpan.org>
139              
140             L<http://skim.cz>
141              
142             =head1 LICENSE AND COPYRIGHT
143              
144             © 2020-2023 Michal Josef Špaček
145              
146             BSD 2-Clause License
147              
148             =head1 VERSION
149              
150             0.30
151              
152             =cut