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.15';
5             # Imports
6 4     4   102561 use strict;
  4         7  
  4         145  
7 4     4   15 use warnings;
  4         6  
  4         103  
8 4     4   43 use v5.10;
  4         14  
  4         152  
9              
10             # Setup Moo for object-oriented niceties
11 4     4   3837 use Moo;
  4         46962  
  4         24  
12 4     4   6755 use namespace::clean;
  4         42334  
  4         21  
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__