Daemonise - a general daemoniser for anything...
Perl Perl6 Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
lib
scripts
t
.gitignore
README.pod
bunny.conf
dist.ini
dungeonkeeper.conf

README.pod

NAME

Daemonise - Daemonise - a general daemoniser for anything...

VERSION

version 1.95

SYNOPSIS

    use Daemonise;
    use File::Basename;
    
    my $d = Daemonise->new();
    $d->name(basename($0));
    
    # log/print more debug info
    $d->debug(1);
    
    # stay in foreground, don't actually fork when calling $d->start
    $d->foreground(1) if $d->debug;
    
    # config file style can be whatever Config::Any supports
    $d->config_file('/path/to/some.conf');
    
    # where to store/look for PID file
    $d->pid_file("/var/run/${name}.pid");
    
    # configure everything so far
    $d->configure;
    
    # fork and redirect STDERR/STDOUT to syslog per default
    $d->start;
    
    # load some plugins (refer to plugin documentation for provided methods)
    $d->load_plugin('RabbitMQ');
    $d->load_plugin('CouchDB');
    $d->load_plugin('JobQueue');
    $d->load_plugin('Event');
    $d->load_plugin('Redis');
    $d->load_plugin('HipChat');
    $d->load_plugin('Riemann');
    $d->load_plugin('PagerDuty');
    $d->load_plugin('KyotoTycoon');
    $d->load_plugin('Graphite');
    
    # reconfigure after loading plugins if necessary
    $d->configure;
    
    # do stuff

ATTRIBUTES

name

hostname

config_file

config

debug

start_time

is_cron

cache_plugin

SUBROUTINES/METHODS

load_plugin

configure

async

log

start

stub method to hook into by plugins

stop

round

dump

BUGS

Please report any bugs or feature requests on GitHub's issue tracker https://github.com/ideegeo/Daemonise/issues.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Daemonise

You can also look for information at:

ACKNOWLEDGEMENTS

AUTHOR

Lenz Gschwendtner <norbu09@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Lenz Gschwendtner.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.