ZConf::Cron - Handles storing cron tabs in ZConf.
Version 1.1.1
use ZConf::Cron; my $zccron = ZConf::Cron->new(); ...
Initiates the module. No arguements are currently taken.
Used for creating a specified set, or initializing.
$zccron->create('someSet'); if($zccron->{error}){ print "Error\n"; }
This deletes a set.
$zccron->delSet('someSet'); if($zccron->{error}){ print "Error\n"; }
This removes a tab.
$zccron->delTab('someTab'); if($zccron->{error}){ print "Error\n"; }
This gets a list of of sets for the config 'cron'.
my @sets=$zccron->getSets(); if($zccron->{error}){ print "Error\n"; }
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"; }
Gets a list of tabs for the current set.
my @tabs=$zccron->getTabs(); if($zccron->{error}){ print "Error\n"; }
This reads the specified set or rereads the current one.
One arguement is taken is the name of the set.
$zccron->readSet($set); if($zccron->{error}){ print "Error!\n"; }
Gets a specified tab.
my $tab=zccron->readTab("sometab"); if($zccron->{error}){ print 'error: '.$zccron->{error}."\n"; }
This saves the currently loaded set.
$zccron->save(); if($zccron->{error}){ print "Error\n"; }
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"; }
This blanks the error storage and is only meant for internal usage.
It does the following.
$self->{error}=undef; $self->{errorString}="";
The keys for this are stored in the config 'zccron'.
Any thing under tabs is considered a tab.
This is reported in '$zccron->{error}'.
Failed to intiate ZConf.
Illegal set name specified.
Could not read the ZConf config 'zccron'.
Failed to get the available sets for 'zccron'.
No tab specified.
No value for the tab specified.
Failed to create the ZConf config 'zccron'.
Failed to create set.
Failed to delete the set.
Failed to delete the tab.
Failed to write the tab to ZConf.
Zane C. Bowers, <vvelox at vvelox.net>
<vvelox at vvelox.net>
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.
bug-zconf-cron at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc ZConf::Cron
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=ZConf-Cron
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/ZConf-Cron
CPAN Ratings
http://cpanratings.perl.org/d/ZConf-Cron
Search CPAN
http://search.cpan.org/dist/ZConf-Cron
SVN
http://eesdp.org/svnweb/index.cgi/pubsvn/browse/Perl/ZConf%3A%3ACron
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.
To install ZConf::Cron, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ZConf::Cron
CPAN shell
perl -MCPAN -e shell install ZConf::Cron
For more information on module installation, please visit the detailed CPAN module installation guide.