App-MonM
view release on metacpan or search on metacpan
lib/App/MonM.pm view on Meta::CPAN
MARKER_SKIP => '[ SKIP ]',
MARKER_INFO => '[ INFO ]',
};
eval { require App::MonM::Notifier };
my $NOTIFIER_LOADED = 1 unless $@;
$NOTIFIER_LOADED = 0 if $NOTIFIER_LOADED && (App::MonM::Notifier->VERSION * 1) < 1.04;
sub again {
my $self = shift;
$self->SUPER::again(); # CTK::App again first!!
# Datadir & Tempdir
if ($self->option("datadir")) {
# Prepare DataDir
preparedir( $self->datadir() ) or do {
$self->status(0);
$self->raise("Can't prepare directory %s", $self->datadir());
};
} elsif ($self->option("daemondir")) {
$self->datadir(File::Spec->catdir(sharedstatedir(), PREFIX));
lib/App/MonM/Daemon.pm view on Meta::CPAN
sub new {
my $class = shift;
my $name = shift;
my %daemon_options = @_;
# Forks (workers)
my $forks = tv2int8($daemon_options{forks} || DAEMONFORKS);
$daemon_options{forks} = $forks < 2 ? 2 : $forks;
my $self = $class->SUPER::new($name, %daemon_options);
# Create general properties
$self->{store} = undef; # Store instance
$self->{notifier} = undef; # Notifier instance
$self->{checker} = undef; # Checker instance
#print _explain($self->ctk->config);
return $self;
}
( run in 0.262 second using v1.01-cache-2.11-cpan-26ccb49234f )