NAME

Crane - Micro framework/helpers for scripts.

SYNOPSIS

use Crane;

...

use Crane ( 'name' => 'example' );

DESCRIPTION

Micro framework/helpers for comfortably develop projects.

OPTIONS

These options are available by default. You can define your custom options if specify it in the import options.

-M, --daemon, --no-daemon

Runs as daemon.

-C path/to/config, --config=path/to/config

Path to configuration file.

-O path/to/log, --log=path/to/log

Path to log file.

-E path/to/error/log, --log-error=path/to/error/log

Path to error log file.

-D, --debug, --no-debug

Debug output.

-V, --verbose, --no-verbose

Verbose output.

-?, --help

Shows help and exits.

RETURN VALUE

In case of running as daemon will return 1 if process is already running.

DIAGNOSTICS

Process is already running: %d

Where %d is a PID.

You tried to run application as daemon while another copy is running.

EXAMPLES

Singleton usage

use Crane;

Daemon usage

use Crane ( 'name' => 'example' );

Configure options

use Crane (
    [ 'from|F=s', 'Start of the interval.', { 'required' => 1 } ],
    [ 'to|F=s',   'End of the interval.',   { 'required' => 1 } ],
);

As a result we have these two options, a separator and default options.

ENVIRONMENT

Please, look at Crane::Base environment description.

FILES

etc/default.conf

Default configuration file in YAML format. Uses if exists.

log/*

Script's log files.

run/*.pid

Script's PID files.

AUTHOR

Tema Novikov, <novikov.tema@gmail.com>

COPYRIGHT AND LICENSE

Copyright 2013-2014 Tema Novikov.

This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.