File Coverage

blib/lib/Dallycot/AST/JSONObject.pm
Criterion Covered Total %
statement 18 22 81.8
branch n/a
condition n/a
subroutine 6 8 75.0
pod 0 1 0.0
total 24 31 77.4


line stmt bran cond sub pod time code
1             package Dallycot::AST::JSONObject;
2             our $AUTHORITY = 'cpan:JSMITH';
3              
4             # ABSTRACT: Create JSON-LD graph from JSON
5              
6 23     23   12174 use strict;
  23         43  
  23         712  
7 23     23   89 use warnings;
  23         32  
  23         480  
8              
9 23     23   85 use utf8;
  23         35  
  23         98  
10 23     23   649 use parent 'Dallycot::AST';
  23         39  
  23         120  
11              
12 23     23   1277 use experimental qw(switch);
  23         38  
  23         235  
13              
14 23     23   2825 use Promises qw(deferred);
  23         35  
  23         123  
15              
16             sub execute {
17 0     0 0   my ( $self, $engine ) = @_;
18              
19             return $engine->collect(@$self)->then(sub {
20 0     0     my(%properties) = @_;
21 0           return Dallycot::Value::JSON->new(\%properties);
22 0           });
23             }
24              
25             1;