Sys::Config::Manage::Scripts - Allows scripts to be stored specifically for a configuration directory.
Version 0.1.0
use Sys::Config::Manage::Scripts; my $foo = Sys::Config::Manage::Scripts->new(); ...
$foo=Sys::Config::Manage::Perms->new(\%args); if($foo->error){ warn('error:'.$foo->error.': '.$foo->errorString); }
This returns the contents of the specified script.
Two arguments are taken. The first and optional one is the configuration directory, which if not specified it will be automatically choosen. The second and required is the script name.
my $data=$foo->getScript( $configDir, $script ); if($foo->error){ warn('error:'.$foo->error.': '.$foo->errorString); }
This lists the scripts for the configuration directory in question.
my @scripts=$foo->listScripts($configDir); if ( $foo->error ){ warn('Error:'.$foo->error.': '.$foo->errorString); }
This verifies that the script in question exists.
Two arguments are taken. The first is the configuration directory and if not specified it will be choosen automatically. The second is the script name.
my $exists=$foo->scriptExists($configDir, $script); if( $foo->error ){ warn('Error:'.$foo->error.': '.$foo->errorString); }else{ if( $exists ){ print "It exists\n"; }else print "It does not exists\n"; } }
This reads a script and returns it's contents.
The arguments are taken. The fist is the name of the configuration directory and it not specified it will be automarically choosen. The second is the script name.
my $contents=$foo->readScript( $configDir, $script ); if( $foo->error ){ warn('Error:'.$foo->error.': '.$foo->errorString); }
This executes the via system.
my $exit=$foo->runScript($configDir, $script); if( $foo->error ){ warn('Error:'.$foo->error.': '.$foo->errorString); }
This writes a script. If it does not exist, it will be created.
Three arguments are taken. The first is the configuration directory, the second is the script name, and the third is the contents of the script.
If the configuration directory is not specified, it will be automaticaly choosen.
$foo->writeScript($configDir, $scriptName, $scriptContents); if( $foo->error ){ warn('Error:'.$foo->error.': '.$foo->errorString); }
Nothing passed for the Sys::Config::Manage object.
$args{scm} is not a Sys::Config::Manage object.
Sys::Config::Manage errored.
Invalid configuration directory name.
The specified configuration directory does not exist.
Unable to open the script directory.
No script specified.
No script data specified.
Unable to create a required directory.
The script name contains a '/'.
Could not open the script.
The script does not exist.
Zane C. Bowers-Hadley, <vvelox at vvelox.net>
<vvelox at vvelox.net>
Please report any bugs or feature requests to bug-sys-config-manage-perms at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Sys-Config-Manage-Perms. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-sys-config-manage-perms at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Sys::Config::Manage::Perms
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Sys-Config-Manage
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Sys-Config-Manage
CPAN Ratings
http://cpanratings.perl.org/d/Sys-Config-Manage
Search CPAN
http://search.cpan.org/dist/Sys-Config-Manage/
Copyright 2011 Zane C. Bowers-Hadley.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Sys::Config::Manage, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sys::Config::Manage
CPAN shell
perl -MCPAN -e shell install Sys::Config::Manage
For more information on module installation, please visit the detailed CPAN module installation guide.