File Coverage

blib/lib/IO/Storm/Tuple.pm
Criterion Covered Total %
statement 15 17 88.2
branch n/a
condition n/a
subroutine 5 6 83.3
pod 0 1 0.0
total 20 24 83.3


line stmt bran cond sub pod time code
1             # ABSTRACT: Storm's primitive data type passed around via streams.
2              
3             package IO::Storm::Tuple;
4             $IO::Storm::Tuple::VERSION = '0.16';
5             # Imports
6 4     4   87211 use strict;
  4         7  
  4         122  
7 4     4   14 use warnings;
  4         6  
  4         83  
8 4     4   30 use v5.10;
  4         11  
  4         109  
9              
10             # Setup Moo for object-oriented niceties
11 4     4   1849 use Moo;
  4         45236  
  4         20  
12 4     4   6520 use namespace::clean;
  4         34376  
  4         16  
13              
14             has 'id' => ( is => 'rw' );
15              
16             has 'component' => ( is => 'rw' );
17              
18             has 'stream' => ( is => 'rw' );
19              
20             has 'task' => ( is => 'rw' );
21              
22             has 'values' => ( is => 'rw' );
23              
24             sub TO_JSON {
25 0     0 0   my ($self) = @_;
26             return {
27 0           id => $self->id,
28             component => $self->component,
29             stream => $self->stream,
30             task => $self->task,
31             values => $self->values
32             };
33             }
34              
35             1;
36              
37             __END__