Zane C. Bowers-Hadley

NAME

ZConf::Cron - Handles storing cron tabs in ZConf.

VERSION

Version 2.0.0

SYNOPSIS

    use ZConf::Cron;

    my $zccron = ZConf::Cron->new;
    if($zccron->error){
        warn('Error:'.$zccron->error.': '.$zccron->errorString);
    }
    
    $zccron->runTab( $tab );
    if($zccron->error){
        warn('Error:'.$zccron->error.': '.$zccron->errorString);
    }

METHODS

new

Initiates the module. No arguements are currently taken.

    my $zccron = ZConf::Cron->new;
    if($zccron->error){
        warn('Error:'.$zccron->error.': '.$zccron->errorString);
    }

delSet

This deletes a set.

    $zccron->delSet('someSet');
    if($zccron->error){
        warn('Error:'.$zccron->error.': '.$zccron->errorString);
    }

delTab

This removes a tab.

One arguement is taken and that is the tab to delete.

    $zccron->delTab('someTab');
    if($zccron->error){
        warn('Error:'.$zccron->error.': '.$zccron->errorString);
    }

getTab

Gets a specified tab.

    my $tab=zccron->readTab("sometab");
    if($zccron->error){
        warn('Error:'.$zccron->error.': '.$zccron->errorString);
    }

init

Initializes a specified set.

If no set is specified, the default is used.

    $zccron->init('someSet');
    if($zccron->error){
        warn('Error:'.$zccron->error.': '.$zccron->errorString);
    }

listSets

This gets a list of of sets for the config 'cron'.

    my @sets=$zccron->getSets;
    if($zccron->error){
        warn('Error:'.$zccron->error.': '.$zccron->errorString);
    }

listTabs

Gets a list of tabs for the current set.

    my @tabs=$zccron->listTabs();
    if($zccron->error){
        warn('Error:'.$zccron->error.': '.$zccron->errorString);
    }

runTab

This runs the specified tab.

One option is taken and that is the specified tab.

    $zccron->runTab( $tab );
    if ( $zccron->error ){
        warn('Error:'.$zccron->error.': '.$zccron->errorString);
    }

setSet

Sets what set is being worked on. It will also read it when this is called.

    $zccron->setSet('someSet');
    if($zccron->error){
        warn('Error:'.$zccron->error.': '.$zccron->errorString);
    }

setTab

Saves a tab. The return is a Perl boolean value.

Two values are required. The first one is the name of the tab. The second one is the value of the tab.

    $zccron->setTab("someTab", $tabValuexs);
    if($zccron->error){
        warn('Error:'.$zccron->error.': '.$zccron->errorString);
    }

within_interval

This is a internal sub.

ZConf Keys

The keys for this are stored in the config 'zccron'.

tabs/<tab>

Any thing under tabs is considered a tab.

ERROR CODES/HANDLING

Error handling is provided by Error::Helper.

1

Failed to intiate ZConf.

2

Illegal set name specified.

3

Could not read the ZConf config 'zccron'.

4

Failed to get the available sets for 'zccron'.

5

No tab specified.

6

No value for the tab specified.

7

Saving the ZConf config failed.

8

Failed to create the ZConf config 'zccron'.

9

Failed to create set.

10

Failed to delete the set.

11

Failed to delete the tab.

12

Failed to write the tab to ZConf.

AUTHOR

Zane C. Bowers, <vvelox at vvelox.net>

BUGS

Please report any bugs or feature requests to bug-zconf-cron at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ZConf-Cron. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

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

    perldoc ZConf::Cron

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2012 Zane C. Bowers, all rights reserved.

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