-
-
05 Jun 2017 14:11:33 UTC
- Distribution: POE-Component-MessageQueue
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues
- Testers (429 / 46 / 0)
- Kwalitee
Bus factor: 0- 66.78% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (75.43KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 3 contributors- David Snopek (http://www.hackyourlife.org)
-
Paul Driver
-
Daisuke Maki
- Dependencies
- Best
- Carp
- DBD::SQLite
- DBI
- Data::Dumper
- Data::UUID
- Event::Notify
- Exception::Class::DBI
- Exception::Class::TryCatch
- File::Temp
- Heap
- Heap::Fibonacci
- IO::File
- IO::String
- Moose
- MooseX::MultiInitArg
- Net::EmptyPort
- Net::Stomp
- POE
- POE::Component::Generic
- POE::Component::Logger
- POE::Component::Server::TCP
- POE::Filter::Stomp
- POE::Wheel::ReadWrite
- Test::Exception
- Test::MockObject
- Test::More
- YAML
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
POE::Component::MessageQueue::Statistics::Publish - Base Statistics Publish Class
METHODS
new(%args)
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 );
publish()
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.
publish_file($filename)
Receives a filename to dump the statistics.
publish_handle($handle)
Receives a handle to dump the statistics.
publish_code($code)
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 ); }
SEE ALSO
POE::Component::MessageQueue::Statistics, POE::Component::MessageQueue::Statistics::Publish::YAML
AUTHOR
Daisuke Maki <daisuke@endeworks.jp>
Module Install Instructions
To install POE::Component::MessageQueue, copy and paste the appropriate command in to your terminal.
cpanm POE::Component::MessageQueue
perl -MCPAN -e shell install POE::Component::MessageQueue
For more information on module installation, please visit the detailed CPAN module installation guide.