Net::FTP::Throttle - Throttle FTP connections
my $ftp = Net::FTP::Throttle->new("some.host.name", MegabitsPerSecond => 2) or die "Cannot connect: $@"; $ftp->login("username", 'password') or die "Cannot login ", $ftp->message; $ftp->cwd("/pub") or die "Cannot change working directory ", $ftp->message; $ftp->get("this.file") or die "get failed ", $ftp->message; $ftp->put("that.file") or die "put failed ", $ftp->message;
Net::FTP is a module implementing a simple FTP client in Perl as described in RFC959. Net::FTP::Throttle is a module which subclasses Net::FTP to add a throttling option, which allows you to set the maximum bandwidth used.
As shown in the synopsis, this is passed into the contructor as a value in megabits per second.
Currently only get and put requests are throttled.
Leon Brocard <acme@astray.com>
Copyright (C) 2005 Foxtons Ltd.
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
To install Net::FTP::Throttle, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::FTP::Throttle
CPAN shell
perl -MCPAN -e shell install Net::FTP::Throttle
For more information on module installation, please visit the detailed CPAN module installation guide.