NAME
Egg::Plugin::File::Rotate - Plugin that does file rotation.
SYNOPSIS
use Egg qw/ File::Rotate /;
# The file made before is reproduced before the file is saved.
if ( -e $file_path ) {
$e->rotate($file_path, stock => 5 );
}
my $fh= FileHandle->new("> $file_path") || return do {
# When the problem occurs, it returns it.
$e->rotate($file_path, reverse => 1 );
die $!;
};
DESCRIPTION
The number is allocated in an old file, and rotating operation is done.
METHODS
rotate ( [TARGET_FILE_PATH], [ARGS_HASH] )
To TARGET_FILE_PATH. Rename is done by the file name that puts one.
If TARGET_FILE_PATH.1 already exists, the rotation processes generations of the number specified to make it to TARGET_FILE_PATH.2 for 'stock' of ARGS_HASH.
If reverse of ARGS_HASH is effective, opposite operation is done.
rotate_report
An easy report for the rotation to have succeeded is returned with ARRAY.
SEE ALSO
AUTHOR
Masatoshi Mizuno <lushe@cpan.org>
COPYRIGHT
Copyright (C) 2007 by Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.