Wikidata/Item/Periodical.pm

filter: Statementstmt 74.2% 26 / 35 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 8 / 10 Podpod 0.0% 0 / 1 totaltotal 68.0% 34 / 50 CC 3 SCAR 13.4
CC
3
Cov
67%
_description
12.0
wikidata
2.0
BEGIN
1.0
CRAP 3.8
« Wikidata/Transform.pm ↑ Summary
1 package MARC::Convert::Wikidata::Item::Periodical;
2  
3 6 ▶use base qw(MARC::Convert::Wikidata::Item);
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 6 ▶use Unicode::UTF8 qw(decode_utf8);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 6 ▶use Wikibase::Datatype::Item;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 6 ▶use Wikibase::Datatype::Snak;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 6 ▶use Wikibase::Datatype::Statement;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 6 ▶use Wikibase::Datatype::Value::Item;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 6 our $VERSION = 0.32;
14  
15 sub wikidata {
16 0 ▶ my $self = shift;
Subroutine wikidata: not called CC=1 SCAR=6.9
Pod undocumented
17  
18 0 my $wikidata = Wikibase::Datatype::Item->new(
19 $self->wikidata_labels,
20 $self->wikidata_descriptions,
21 'statements' => [
22 # instance of: book series
23 Wikibase::Datatype::Statement->new(
24 'snak' => Wikibase::Datatype::Snak->new(
25 'datatype' => 'wikibase-item',
26 'datavalue' => Wikibase::Datatype::Value::Item->new(
27 'value' => 'Q1002697',
28 ),
29 'property' => 'P31',
30 ),
31 ),
32  
33 # TODO
34 $self->wikidata_authors,
35 $self->wikidata_authors_of_introduction,
36 $self->wikidata_compilers,
37 $self->wikidata_dml,
38 $self->wikidata_edition_number,
39 $self->wikidata_editors,
40 $self->wikidata_end_time,
41 $self->wikidata_external_ids,
42 $self->wikidata_illustrators,
43 $self->wikidata_issn,
44 $self->wikidata_krameriuses,
45 $self->wikidata_language,
46 $self->wikidata_number_of_pages,
47 $self->wikidata_place_of_publication,
48 $self->wikidata_publication_date,
49 $self->wikidata_publishers,
50 $self->wikidata_series,
51 $self->wikidata_start_time,
52 $self->wikidata_subtitles,
53 $self->wikidata_title,
54 $self->wikidata_translators,
55 ],
56 );
57  
58 0 return $wikidata;
59 }
60  
61 sub _description {
62 0 ▶ my ($self, $lang) = @_;
Subroutine _description: not called CC=3 SCAR=24.8
63  
64 0 my $ret;
65 0 ▶ if ($lang eq 'cs') {
Branch: 2 branches
BranchTrueFalseTotal
if ($lang eq 'cs') { } 0 0 0
elsif ($lang eq 'en') { } 0 0 0
66 0 $ret = decode_utf8('české periodikum');
67  
68 } elsif ($lang eq 'en') {
69 0 $ret = 'Czech periodical';
70 }
71  
72 0 return $ret;
73 }
74  
75 6 1;
76  
77 __END__
« Wikidata/Transform.pm ↑ Summary