File Coverage

blib/lib/Dallycot/AST/BuildVector.pm
Criterion Covered Total %
statement 12 18 66.6
branch n/a
condition n/a
subroutine 4 7 57.1
pod 0 2 0.0
total 16 27 59.2


line stmt bran cond sub pod time code
1             package Dallycot::AST::BuildVector;
2             our $AUTHORITY = 'cpan:JSMITH';
3              
4             # ABSTRACT: Create vector value
5              
6 23     23   12292 use strict;
  23         39  
  23         730  
7 23     23   94 use warnings;
  23         42  
  23         553  
8              
9 23     23   105 use utf8;
  23         32  
  23         98  
10 23     23   485 use parent 'Dallycot::AST';
  23         29  
  23         116  
11              
12             sub to_rdf {
13 0     0 0   my($self, $model) = @_;
14              
15 0           return $model -> apply(
16             $model -> meta_uri('loc:build-vector'),
17             [ @$self ],
18             {}
19             );
20             # my $bnode = $model -> bnode;
21             # $model -> add_type($bnode, 'loc:Vector');
22             # $model -> add_list($bnode, 'loc:expressions',
23             # map { $_ -> to_rdf($model) } @$self
24             # );
25             }
26              
27             sub execute {
28 0     0 0   my ( $self, $engine ) = @_;
29              
30             return $engine->collect(@$self)->then(
31             sub {
32 0     0     my (@bits) = @_;
33              
34 0           bless \@bits => 'Dallycot::Value::Vector';
35             }
36 0           );
37             }
38              
39             1;