RDF/RDB2RDF.pm

filter: Statementstmt 88.5% 31 / 35 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 8 / 10 Podpod 0.0% 0 / 3 totaltotal 80.0% 40 / 50 CC 2 SCAR 3.1
CC
2
Cov
86%
new
2.0
process
2.0
process_turtle
2.0
CRAP 1.4
« RDF/RDB2RDF/R2RML.pm ↑ Summary URI/Escape/Optimistic.pm »
1 package RDF::RDB2RDF;
2  
3 5 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 5 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 5 ▶use RDF::RDB2RDF::Simple;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 5 ▶use RDF::RDB2RDF::R2RML;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 5 ▶use RDF::RDB2RDF::DirectMapping;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 5 ▶use RDF::RDB2RDF::DirectMapping::Store;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 5 our $AUTHORITY = 'cpan:TOBYINK';
13 5 our $VERSION = '0.008';
14  
15 sub new
16 3 ▶{
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
17 3 my ($class, $type, @args) = @_;
18
19 3 my $map = {
20 simple => 'Simple',
21 r2rml => 'R2RML',
22 direct => 'DirectMapping',
23 directmapping => 'DirectMapping',
24 };
25
26 3 $type =~ s/[^A-Za-z0-9]//g;
27 3 ▶ $type = $map->{lc $type} if exists $map->{lc $type};
Branch: 1 branch
BranchTrueFalseTotal
if exists $$map{lc $type} 3 0 3
28
29 3 $class .= '::'.$type;
30 3 $class->new(@args);
31 }
32  
33 sub process
34 0 ▶{
Subroutine process: not called CC=1 SCAR=6.9
Pod undocumented
35 0 die "Not implemented.\n";
36 }
37  
38 sub process_turtle
39 0 ▶{
Subroutine process_turtle: not called CC=1 SCAR=6.9
Pod undocumented
40 0 my ($self, $dbh, %options) = @_;
41
42 0 my $model = $self->process($dbh);
43 0 return RDF::Trine::Serializer
44 ->new('Turtle', %options)
45 ->serialize_model_to_string($model);
46 }
47  
48 {
49 5 package RDF::TrineX::Store::DirectMapping;
50 5 our @ISA = 'RDF::RDB2RDF::DirectMapping::Store';
51 }
52  
53 5 1;
54 __END__
« RDF/RDB2RDF/R2RML.pm ↑ Summary URI/Escape/Optimistic.pm »