Léon Brocard


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;

    or die "Cannot change working directory ", $ftp->message;

    or die "get failed ", $ftp->message;

    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.