| 1 | package Exobrain::Agent::Action::GeoLog; | ||
| 2 | use Exobrain; | ||
| 3 | use Moose; | ||
| 4 | |||
| 5 | with 'Exobrain::Agent::Run'; | ||
| 6 | with 'Exobrain::Agent::Depends'; | ||
| 7 | |||
| 8 | # ABSTRACT: Log our own check-ins to a personal log (such as idonethis). | ||
| 9 | our $VERSION = '1.08'; # VERSION | ||
| 10 | |||
| 11 | method depends() { return qw(Measurement::Geo Intent::PersonalLog) } | ||
| 12 | |||
| 13 | method run() { | ||
| 14 | $self->exobrain->watch_loop( | ||
| 15 | class => 'Measurement::Geo', | ||
| 16 | filter => sub { $_->is_me }, | ||
| 17 | then => sub { | ||
| 18 | $self->exobrain->intent("PersonalLog", | ||
| 19 | message => $_->summary | ||
| 20 | ); | ||
| 21 | }, | ||
| 22 | ); | ||
| 23 | } | ||
| 24 | |||
| 25 | __PACKAGE__->meta->make_immutable; | ||
| 26 | |||
| 27 | 1; | ||
| 28 | |||
| 29 | __END__ |