David Muir Sharnoff > Proc-JobQueue > Proc::JobQueue::Move

Download:
modules/Proc-JobQueue-0.903.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

 Proc::JobQueue::Move - move files from one place to another

SYNOPSIS ^

 use Proc::JobQueue::BackgroundQueue;
 use aliased 'Proc::JobQueue::Command';

 my $queue = new Proc::JobQueue::BackgroundQueue;

 use aliased 'Proc::JobQueue::Move';

 my $job = Move->new($opts, $config, $from_file, $to_file, $to_host, $from_host);

 $queue->add($job);

 $queue->finish;

DESCRIPTION ^

This is a subclass of Proc::JobQueue::Job. In the background, move a file to a new location (possibly on a new host).

scp will be used to move files to remote locations. The trust relationships must already exist. Files will be compressed in transit if $config-{compress_network_copies}> is true.

Only one copy job per destination host is allowed to run simultaneously.

If the $to_host matches Sys::Hostname::hostname then the mv command will be used instead of scp and rm.

CONSTRUCTION ^

The $opts parameter is not currently used. The $config parameter must be a hash ref and the following keys are checked:

compress_network_copies

If true, will add -C to the invocation of scp.

The rest of the parameters are self-explanatory. The from_host parameter defaults to the local system. So does the to_host parameter.

ERRATTA ^

The argument order for the constructor doesn't make any sense. Sorry.

Either the from_host or the to_host needs to be the local host.

SEE ALSO ^

Proc::JobQueue Proc::JobQueue::Job Proc::JobQueue::BackgroundQueue

LICENSE ^

Copyright (C) 2007-2008 SearchMe, Inc. Copyright (C) 2008-2010 David Sharnoff. Copyright (C) 2011 Google, Inc. This package may be used and redistributed under the terms of either the Artistic 2.0 or LGPL 2.1 license.

syntax highlighting: