File Coverage

blib/lib/Dallycot/AST/Cons.pm
Criterion Covered Total %
statement 15 21 71.4
branch n/a
condition n/a
subroutine 5 8 62.5
pod 0 2 0.0
total 20 31 64.5


line stmt bran cond sub pod time code
1             package Dallycot::AST::Cons;
2             our $AUTHORITY = 'cpan:JSMITH';
3              
4             # ABSTRACT: Compose lambdas into a new lambda
5              
6 23     23   12466 use strict;
  23         38  
  23         701  
7 23     23   91 use warnings;
  23         30  
  23         446  
8              
9 23     23   86 use utf8;
  23         32  
  23         94  
10 23     23   408 use parent 'Dallycot::AST';
  23         93  
  23         184  
11              
12 23     23   1210 use Promises qw(deferred);
  23         43  
  23         136  
13              
14             sub to_rdf {
15 0     0 0   my($self, $model) = @_;
16              
17 0           return $model -> apply(
18             $model -> meta_uri('loc:consolidate'),
19             [ @$self ],
20             {}
21             );
22             }
23              
24             sub execute {
25 0     0 0   my ( $self, $engine ) = @_;
26              
27             return $engine->collect(@$self)->then(
28             sub {
29 0     0     my ( $root, @things ) = @_;
30 0           $root->prepend(@things);
31             }
32 0           );
33             }
34              
35             1;