| 1 | package Exobrain::Measurement::Tweet; | ||
| 2 | |||
| 3 | use 5.010; | ||
| 4 | use autodie; | ||
| 5 | use Moose; | ||
| 6 | use Method::Signatures; | ||
| 7 | |||
| 8 | # ABSTRACT: Tweet measurement packet | ||
| 9 | our $VERSION = '1.04'; # VERSION | ||
| 10 | |||
| 11 | # Declare that we will have a summary attribute. This is to make | ||
| 12 | # our roles happy. | ||
| 13 | sub summary; | ||
| 14 | |||
| 15 | # This needs to happen at begin time so it can add the 'payload' | ||
| 16 | # keyword. | ||
| 17 | BEGIN { with 'Exobrain::Measurement::Social'; } | ||
| 18 | |||
| 19 | |||
| 20 | has summary => ( | ||
| 21 | isa => 'Str', builder => '_build_summary', lazy => 1, is => 'ro' | ||
| 22 | ); | ||
| 23 | |||
| 24 | method _build_summary() { | ||
| 25 | return '@' . $self->from . " : " . $self->text; | ||
| 26 | } | ||
| 27 | |||
| 28 | 1; | ||
| 29 | |||
| 30 | __END__ |