| 1 | package RPC::ExtDirect::Demo::PollProvider; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | use POSIX 'strftime'; | ||
| 7 | |||
| 8 | use RPC::ExtDirect; | ||
| 9 | use RPC::ExtDirect::Event; | ||
| 10 | |||
| 11 | sub poll : ExtDirect(pollHandler) { | ||
| 12 | my $time = strftime "Successfully polled at: %a %b %e %H:%M:%S %Y", | ||
| 13 | localtime; | ||
| 14 | |||
| 15 | return RPC::ExtDirect::Event->new('message', $time); | ||
| 16 | } | ||
| 17 | |||
| 18 | 1; | ||
| 19 | |||
| 20 | __END__ |