blib/lib/RDF/TrineX/Compatibility/Attean.pm

filter: Statementstmt 92.1% 35 / 38 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 76.9% 10 / 13 Podpod 12.5% 1 / 8 totaltotal 79.3% 50 / 63 CC 3 SCAR 4.7
CC
3
Cov
93%
datatype
3.0
ntriples_string
2.0
equals
2.0
CRAP 1.6
↑ Summary
1 6 ▶use 5.010001;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package RDF::TrineX::Compatibility::Attean;
6 6 ▶no warnings 'redefine';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 6 our $AUTHORITY = 'cpan:KJETILK';
9 6 our $VERSION = '0.100';
10  
11 6 ▶use RDF::Trine;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 6 package RDF::Trine::Node {
14  
15 0 ▶ sub ntriples_string { return $_[0]->as_ntriples }
Subroutine ntriples_string: not called CC=1 SCAR=6.9
Pod undocumented
16
17 0 ▶ sub equals { return shift->equal(@_); }
Subroutine equals: not called CC=1 SCAR=6.9
Pod undocumented
18 };
19  
20  
21 6 package RDF::Trine::Node::Resource {
22 0 ▶ sub abs { return $_[0]->uri }
Subroutine abs: not called CC=1 SCAR=6.9
Pod undocumented
23 };
24  
25 6 package RDF::Trine::Node::Literal {
26
27 4 ▶ sub value { return $_[0]->literal_value }
Subroutine value: called CC=1 SCAR=0.0
Pod documented
28
29 1 ▶ sub language { return $_[0]->literal_value_language }
Subroutine language: called CC=1 SCAR=0.0
Pod undocumented
30
31 8 ▶ sub datatype { # A bit of extra logic to support RDF 1.1 semantics
Subroutine datatype: called CC=3 SCAR=11.0
Pod undocumented
32 8 my $self = shift;
33 8 my $string;
34 8 ▶ if ($self->has_datatype) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->has_datatype) { } 4 4 8
35 4 $string = $self->literal_datatype;
36 } else {
37 4 ▶ if ($self->has_language) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->has_language) { } 2 2 4
38 2 $string = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#langString';
39 } else {
40 2 $string = 'http://www.w3.org/2001/XMLSchema#string';
41 }
42 }
43 8 return RDF::Trine::Node::Resource->new($string);
44 }
45 };
46  
47 6 package RDF::Trine::Model {
48  
49 1 ▶ sub get_quads {
Subroutine get_quads: called CC=1 SCAR=0.0
Pod undocumented
50 1 my $self = shift;
51 1 return $self->get_statements(@_);
52 }
53  
54 1 ▶ sub count_quads {
Subroutine count_quads: called CC=1 SCAR=0.0
Pod undocumented
55 1 my $self = shift;
56 1 return $self->count_statements(@_);
57 }
58  
59 };
60
61 6 1;
62  
63 __END__
↑ Summary