POE::Component::MessageQueue::Statistics::Publish - Base Statistics Publish Class
Creates a new instance. You must pass in an instance of POE::Component::MessageQueue::Statistics, and an output destination
# initialized elsewhere my $stats = POE::Component::MessageQueue::Statistics->new; my $publish = POE::Component::MessageQueue::Statistics::Publish::YAML->new( output => \*STDERR, statistics => $stats, interval => 10, # dump every 10 seconds );
Publishes the current state of the statistics. This is actually a dispatcher that dispatches to the appropriate method calls (described below) that are specific to a particular output type.
Your subclass should implement the appropriate methods (output types) that you want to support.
Receives a filename to dump the statistics.
Receives a handle to dump the statistics.
Receives a subroutine reference. Your code should simply pass the result output to $code and execute it:
sub publish_code { my ($self, $code) = @_; my $output = ....; # generate output here $code->( $output ); }
POE::Component::MessageQueue::Statistics, POE::Component::MessageQueue::Statistics::Publish::YAML
Daisuke Maki <daisuke@endeworks.jp>
To install POE::Component::MessageQueue, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POE::Component::MessageQueue
CPAN shell
perl -MCPAN -e shell install POE::Component::MessageQueue
For more information on module installation, please visit the detailed CPAN module installation guide.