OTK/Queries.pm

filter: Statementstmt 100% 25 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 2 totaltotal 93.9% 31 / 33 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« OTK/Queries/OWL.pm ↑ Summary
1 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 package Conclave::OTK::Queries;
4 # ABSTRACT: query provider for OTK
5  
6 3 ▶use Template;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 ▶use Conclave::OTK::Queries::OWL;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
10 2 my ($class, $format) = @_;
11 2 my $self = bless({}, $class);
12  
13 2 my $provider = "Conclave::OTK::Queries::$format";
14  
15 2 my $template_config = {
16 INCLUDE_PATH => [ 'templates' ],
17 };
18 2 my $template = Template->new({
19 LOAD_TEMPLATES => [ $provider->new($template_config) ],
20 });
21  
22 2 $self->{format} = $format;
23 2 $self->{template} = $template;
24  
25 2 return $self;
26 }
27  
28 22 ▶sub process {
Subroutine process: called CC=1 SCAR=0.0
Pod undocumented
29 22 my ($self, $template_name, $vars) = @_;
30  
31 22 my $sparql;
32 22 $self->{template}->process($template_name, $vars, \$sparql);
33  
34 22 return $sparql
35 }
36  
37 3 1;
38  
39 __END__
« OTK/Queries/OWL.pm ↑ Summary