App::derived::Plugin - base class of App::derived::Plugin
package App::derived::Plugin::Dumper; use strict; use warnings; use parent qw/App::derived::Plugin/; use Data::Dumper; use Class::Accessor::Lite ( ro => [qw/interval/] ); sub int { my $self = shift; $self->interval(10) unless $self->interval; $self->add_worker( 'dumper', sub { while (1) { sleep $self->interval; my @keys = $self->service_keys(); for my $key ( @keys ) { my $ref = $self->service_stats->{$key} print Dumper([$key,$ref]); } } } ); }
This module is base class to make App::derived Plugin.
Utility method. returns JSON.pm object
Retrieve service status
Checking existence of service named $key
get all registered service keys
Registering a worker
Required to implementing this method in your Plugin
<App::derived::Plugin::Memcached>
Masahiro Nagano <kazeburo@gmail.com>
Copyright (C) Masahiro Nagano
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install App::derived, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::derived
CPAN shell
perl -MCPAN -e shell install App::derived
For more information on module installation, please visit the detailed CPAN module installation guide.