App-MonM-Notifier
view release on metacpan or search on metacpan
lib/App/MonM/Notifier.pm view on Meta::CPAN
use App::MonM::Notifier::Store;
use constant {
NODE_NAME => 'notifier',
NODE_NAME_ALIAS => 'monotifier',
};
sub new {
my $class = shift;
my %args = @_;
my $self = $class->SUPER::new(%args);
# Store
my $store_conf = hash($self->config->conf(NODE_NAME) || $self->config->conf(NODE_NAME_ALIAS));
$store_conf->{expires} = getExpireOffset(lvalue($store_conf, "expires") || lvalue($store_conf, "expire") || 0);
$store_conf->{maxtime} = getExpireOffset(lvalue($store_conf, "maxtime") || 0);
my $store = App::MonM::Notifier::Store->new(%$store_conf);
$self->{store} = $store;
#print App::MonM::Util::explain($store);
return $self;
lib/App/MonM/Notifier/Monotifier.pm view on Meta::CPAN
ROWS_LIMIT => 1000,
DATE_FORMAT => '%YYYY-%MM-%DD %hh:%mm:%ss',
TABLE_INFO => [(
[12, 'NAME'],
[68, 'VALUE'],
)],
};
sub again {
my $self = shift;
$self->SUPER::again(); # CTK::App again first!!
# Store
my $store_conf = hash($self->conf(NODE_NAME) || $self->conf(NODE_NAME_ALIAS));
$store_conf->{expires} = getExpireOffset(lvalue($store_conf, "expires") || lvalue($store_conf, "expire") || 0);
$store_conf->{maxtime} = getExpireOffset(lvalue($store_conf, "maxtime") || 0);
my $store = App::MonM::Notifier::Store->new(%$store_conf);
$self->{store} = $store;
#print App::MonM::Util::explain($store);
return $self; # CTK requires!
( run in 0.366 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )