Zane C. Bowers > ZConf-Cron-0.0.1 > ZConf::Cron

Download:
ZConf-Cron-0.0.1.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.0.1   Source   Latest Release: ZConf-Cron-1.0.1

NAME ^

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

VERSION ^

Version 0.0.1

SYNOPSIS ^

Perhaps a little code snippet.

    use ZConf::Cron;

    my $zccron = ZConf::Cron->new();
    ...

FUNCTIONS ^

new

Initiates the module. No arguements are currently taken.

create

Used for creating a specified set, or initializing.

    $zccron->create('someSet');
    if($zccron->{error}){
        print "Error\n";
    }

delSet

This deletes a set.

    $zccron->delSet('someSet');
    if($zccron->{error}){
        print "Error\n";
    }

delTab

This removes a tab.

    $zccron->delTab('someTab');
    if($zccron->{error}){
        print "Error\n";
    }

getSets

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

    my @sets=$zccron->getSets();
    if($zccron->{error}){
        print "Error\n";
    }

setSet

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

    $zccron->setSet('someSet');
    if($zccron->{error}){
        print "Error\n";
    }

getTabs

Gets a list of tabs for the current set.

    my @tabs=$zccron->getTabs();
    if($zccron->{error}){
        print "Error\n";
    }

readTab

Gets a specified tab.

    my $tab=zccron->readTab("sometab");
    if($zccron->{error}){
        print 'error: '.$zccron->{error}."\n";
    }

save

This saves the currently loaded set.

    $zccron->save();
    if($zccron->{error}){
        print "Error\n";
    }

writeTab

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.

    #checks it using the return
    if(!$zccron->writeTab("someTab", $tabValuexs)){
        print "it failed\n";
    }
    
    #checks it using the error interface
    $zccron->writeTab("someTab", $tabValuexs);
    if($zccron->{error}){
        print "it failed\n";
    }

ZConf Keys ^

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

tabs/<tab>

Any thing under tabs is considered a tab.

ERROR CODES ^

This is reported in '$zccron->{error}'.

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.

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.

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 2008 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.