Print/Term.pm

filter: Statementstmt 100% 22 / 22 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 100% 31 / 31 CC 2 SCAR 2.5
CC
2
Cov
100%
print
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Print/Item.pm ↑ Summary Print/Value/Globecoordinate.pm »
1 package Wikibase::Datatype::Print::Term;
2  
3 13 ▶use base qw(Exporter);
Subroutine BEGIN: called CC=1 SCAR=0.0
4 13 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 13 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 13 ▶use Error::Pure qw(err);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 13 ▶use Readonly;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 13 Readonly::Array our @EXPORT_OK => qw(print);
11  
12 13 our $VERSION = 0.21;
13  
14 65 ▶sub print {
Subroutine print: called CC=2 SCAR=6.9
Pod documented
15 65 my ($obj, $opts_hr) = @_;
16  
17 65 ▶ if (! $obj->isa('Wikibase::Datatype::Term')) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($obj->isa("Wikibase::Datatype::Term")) 1 64 65
18 1 err "Object isn't 'Wikibase::Datatype::Term'.";
19 }
20  
21 64 return $obj->value.' ('.$obj->language.')';
22 }
23  
24 13 1;
25  
26 __END__
« Print/Item.pm ↑ Summary Print/Value/Globecoordinate.pm »