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.17'; |
5
|
|
|
|
|
|
|
# Imports |
6
|
4
|
|
|
4
|
|
89324
|
use strict; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
150
|
|
7
|
4
|
|
|
4
|
|
17
|
use warnings; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
101
|
|
8
|
4
|
|
|
4
|
|
38
|
use v5.10; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
130
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# Setup Moo for object-oriented niceties |
11
|
4
|
|
|
4
|
|
2144
|
use Moo; |
|
4
|
|
|
|
|
45661
|
|
|
4
|
|
|
|
|
19
|
|
12
|
4
|
|
|
4
|
|
6608
|
use namespace::clean; |
|
4
|
|
|
|
|
36726
|
|
|
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__ |