NAME

App::Followme::UploadData

SYNOPSIS

    use App::Followme::UploadData;
    my $meta = App::Followme::UploadData->new(exclude => '*.cfg');
    my $index_file = $self->to_file($self->{base_directory});
    my $files = App::Followme::Template->build('files', $index_file);

DESCRIPTION

This module generates the list of files and folders to be uploaded to the remote site and the checksums for each file.

METHODS

All data classes are first instantiated by calling new and data items are retrieved by calling the build method with the item name as the first argument and the file or folder as the second argument.

VARIABLES

The file metadata class can evaluate the following variables. When passing a name to the build method, the sigil should not be used.

@files

The list of files to be uploaded from a folder.

@folders

The list of folders contining files to be uploaded

$checksum

The MD5 hash of the file contents, used for determining if file has changed and needs to be uploaded.

CONFIGURATION

This class has the following configuration variables:

excluded

A filename pattern or comma separated list of filename patterns that match files that should not be uploaded. The default value is '*.cfg' which matches configuration files.

exclude_dirs

A filename pattern or comma separated list of filename patterns that match folders that should not be uploaded/ The default value is '.*,_*' which matches folders starting with a dot (hiddern folders) and starting with an underscore character.

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>