| 1 | # ABSTRACT: Storm's primitive data type passed around via streams. | ||
| 2 | |||
| 3 | package IO::Storm::Tuple; | ||
| 4 | 4 | $IO::Storm::Tuple::VERSION = '0.17'; | |
| 5 | # Imports | ||
| 6 | 4 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 4 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 4 | ▶ | use v5.10; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | # Setup Moo for object-oriented niceties | ||
| 11 | 4 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 4 | ▶ | use namespace::clean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | 4 | has 'id' => ( is => 'rw' ); | |
| 15 | |||
| 16 | 4 | has 'component' => ( is => 'rw' ); | |
| 17 | |||
| 18 | 4 | has 'stream' => ( is => 'rw' ); | |
| 19 | |||
| 20 | 4 | has 'task' => ( is => 'rw' ); | |
| 21 | |||
| 22 | 4 | has 'values' => ( is => 'rw' ); | |
| 23 | |||
| 24 | 0 | ▶ | sub TO_JSON { |
|
Subroutine
TO_JSON: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 25 | 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 | 4 | 1; | |
| 36 | |||
| 37 | __END__ | ||