Take me over?
NAME
Verby::Action::Copy - Action to copy a directory tree to from one location to another using rsync.
SYNOPSIS
use Verby::Step::Closure qw/step/;
step "Verby::Action::Copy" => sub {
my ($self, $c) = @_;
$c->source("/path/to/copy/from");
$c->dest("/path/to/copy/to");
}
DESCRIPTION
This module uses File::Rsync to copy a directory tree to from one location to another.
METHODS
- do
-
Runs rsync from
$c->source
to$c->dest
unconditionally. Since rsync has it's own verification logic this is still fairly fast. - rsync_cli
-
Returns an array reference of the command line to use. Calls
getcmd
onrsync_object
.
PARAMETERS
The following parameters are taken from the context object:
- source
- dest
-
The rsync source/destination paths to use.
FIELDS
The actions instance can contain additional configuration options.
- rsync_path
-
When undef, this is handled by File::Rsync. Otherwise you can provide an alternate path for rsync.
- rsync_options
-
A hash reference with additional optiosn to override the defaults.
- rsync_object
-
This is a lazy field, that creates a File::Rsync object based on the other fields. You may override this with any object that can handle File::Rsync's
getcmd
method.
BUGS
None that we are aware of. Of course, if you find a bug, let us know, and we will be sure to fix it.
CODE COVERAGE
We use Devel::Cover to test the code coverage of the tests, please refer to COVERAGE section of the Verby module for more information.
SEE ALSO
File::Rsync, Verby::Action::Run
AUTHOR
Yuval Kogman, <nothingmuch@woobling.org>
COPYRIGHT AND LICENSE
Copyright 2005, 2006 by Infinity Interactive, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.