NAME
App::Followme::UploadSite - Upload changed and new files
SYNOPSIS
my $app = App::Followme::UploadSite->new(\%configuration);
$app->run($folder);
DESCRIPTION
This module uploads changed files to a remote site. The default method to do the uploads is ftp, but that can be changed by changing the parameter upload_pkg. This package computes a checksum for every file in the site. If the checksum has changed since the last time it was run, the file is uploaded to the remote site. If there is a checksum, but no local file, the file is deleted from the remote site. If this module is run in quick mode, only files whose modification date is later then the last time it was run are checked.
CONFIGURATION
The following fields in the configuration file are used:
- credentials
-
The name of the file which holds the user name and password for the remote site in obfuscated form. Te default name is 'upload.cred'.
- hash_file
-
The name of the file containing all the checksums for files on the site. The default name is 'upload.hash'.
- max_errors
-
The number of upload errors the module tolerate before quitting. The default value is 5.
- state_directory
-
The name of the directory containing the credentials and hash file. This directory name is relative to the top directory of the site. The default name is '_state'.
- upload_pkg
-
The name of the package with methods that add and delete files on the remote site. The default is App::Followme::UploadFtp. Other packages can be written, the methods a package must support can be found in App::Followme::UploadNone.
- verbose
-
Print names of uploaded files when not in quick mode
LICENSE
Copyright (C) Bernie Simon.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Bernie Simon <bernie.simon@gmail.com>