Rex::Commands::Upload - Upload a local file to a remote server
With this module you can upload a local file via sftp to a remote host.
task "upload", "remoteserver", sub { upload "localfile", "/remote/file"; };
Perform an upload. If $remote is a directory the file will be uploaded to that directory.
task "upload", "remoteserver", sub { upload "localfile", "/path"; };
This function supports the following hooks:
This gets executed before everything is done. The return value of this hook overwrite the original parameters of the function-call.
This gets executed right before the new file is written.
This gets executed right after the file was written.
This gets executed right before the upload() function returns.
To install Rex, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Rex
CPAN shell
perl -MCPAN -e shell install Rex
For more information on module installation, please visit the detailed CPAN module installation guide.