Query/Expression/Nary.pm

filter: Statementstmt 68.5% 24 / 35 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 8 / 10 Podpod 100% 2 / 2 totaltotal 72.3% 34 / 47 CC 1 SCAR 1.8
CC
1
Cov
69%
sse
2.0
as_sparql
2.0
BEGIN
1.0
CRAP 1.2
« Query/Algebra/Union.pm ↑ Summary Query/Expression/Alias.pm »
1 # RDF::Query::Expression::Nary
2 # -----------------------------------------------------------------------------
3  
4 =head1 NAME
5  
6 RDF::Query::Expression::Nary - Class for n-ary expressions
7  
8 =head1 VERSION
9  
10 This document describes RDF::Query::Expression::Nary version 2.919.
11  
12 =cut
13  
14 package RDF::Query::Expression::Nary;
15  
16 36 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 36 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 36 ▶no warnings 'redefine';
Subroutine BEGIN: called CC=1 SCAR=0.0
19 36 ▶use base qw(RDF::Query::Expression);
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 36 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
22 36 ▶use Scalar::Util qw(blessed);
Subroutine BEGIN: called CC=1 SCAR=0.0
23 36 ▶use Carp qw(carp croak confess);
Subroutine BEGIN: called CC=1 SCAR=0.0
24  
25 ######################################################################
26  
27 36 our ($VERSION);
28 36 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
29 36 $VERSION = '2.919';
30 }
31  
32 ######################################################################
33  
34 =head1 METHODS
35  
36 Beyond the methods documented below, this class inherits methods from the
37 L<RDF::Query::Expression> class.
38  
39 =over 4
40  
41 =cut
42  
43 =item C<< sse >>
44  
45 Returns the SSE string for this algebra expression.
46  
47 =cut
48  
49 0 ▶sub sse {
Subroutine sse: not called CC=1 SCAR=6.9
Pod documented
50 0 my $self = shift;
51 0 my $context = shift;
52
53 return sprintf(
54 '(%s %s)',
55 $self->op,
56 0 join(' ', map { $_->sse( $context ) } $self->operands),
57 );
58 }
59  
60 =item C<< as_sparql >>
61  
62 Returns the SPARQL string for this algebra expression.
63  
64 =cut
65  
66 0 ▶sub as_sparql {
Subroutine as_sparql: not called CC=1 SCAR=6.9
Pod documented
67 0 my $self = shift;
68 0 my $context = shift;
69 0 my $indent = shift;
70 0 my $op = $self->op;
71 0 my @args = map { $_->as_sparql( $context, $indent ) } $self->operands;
72 0 return join(" $op ", @args);
73 }
74  
75  
76 36 1;
77  
78 __END__
« Query/Algebra/Union.pm ↑ Summary Query/Expression/Alias.pm »