NAME
Sys::Config::Manage::Remove - Removes no longer desired files and/or directories.
VERSION
Version 0.0.1
SYNOPSIS
use Sys::Config::Manage::Remove;
my $foo = Sys::Config::Manage::Remove->new();
...
METHODS
new
args hash
scm
This is a initialized Sys::Config::Manage object.
$foo=Sys::Config::Manage::Remove->new(\%args);
if($foo->error){
warn('error:'.$foo->error.': '.$foo->errorString);
}
add
This adds a directory or file to be removed.
$foo->add( $configDir, $somethingToAdd );
if ( $foo->error ){
warn('Error:'.$foo->error.': '.$foo->errorString);
}
clean
This removes everything in the remove list for a specified configuration directory.
There is one argument taken and that is the configuration directory. If it is not specified, it will be automatically choosen.
$foo->clean( $configDir );
if ( $foo->error ){
warn('Error:'.$foo->error.': '.$foo->errorString);
}
exists
This check if a path already exists in the list or not.
Two arguments are taken. The first is the configuration directory, which is automatically choosen if not specified. The second is the path to check for.
The returned value is a boolean.
my $exists=$foo->exists( $configDir, $path );
if ( $foo->error ){
warn('Error:'.$foo->error.': '.$foo->errorString);
}
list
This returns the list of the paths to remove.
One argument is taken and that is the configuration directory to us. If not specified, it is automatically selected.
my @removePaths=$foo->list( $configDir );
if ( $foo->error ){
warn('Error:'.$foo->error.': '.$foo->errorString);
}
remove
This removes the specified path from the remove list.
Two arguments are taken. The first is the configuration directory, which if not specified is automatically choosen. The second is the path to remove.
$foo->remove( $configDir, $path );
if ( $foo->error ){
warn('Error:'.$foo->error.': '.$foo->errorString);
}
save
This replaces the current remove list with another.
Two arguments are taken. The first is the configuration directory, which is automatically selected if not specified. The second is the list to replace it with.
$foo->save( $configDir, \@removeList );
if ( $foo->error ){
warn('Error:'.$foo->error.': '.$foo->errorString);
}
ERROR CODES
1
Nothing passed for the Sys::Config::Manage object.
2
$args{scm} is not a Sys::Config::Manage object.
3
No item that should be removed defined.
4
The path does not appear to be a valid path. This means it does not start with a "/" or contains a newline.
5
Sys::Config::Manage->selectConfigDir errored.
6
Failed to open the remove file.
7
Sys::Config::Manage->validConfigDirName errored.
8
Invalid configuration directory name.
9
The configuration directory does not exist.
10
It already exists.
11
Failed to remove a file or path.
12
Failed to add the new file.
13
The path does not exist.
AUTHOR
Zane C. Bowers-Hadley, <vvelox at vvelox.net>
BUGS
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.
SUPPORT
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
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
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.