Skip Menu |

This queue is for tickets about the Net-FTP-Throttle CPAN distribution.

Report information
The Basics
Id: 17211
Status: resolved
Priority: 0/
Queue: Net-FTP-Throttle

People
Owner: Nobody in particular
Requestors: nick.cpan [...] xlmt.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.29
Fixed in: (no value)



Subject: Refused connection generates fatal error
If the ftp host refuses the connection, Net::FTP::Throttle has a fatal error as follows: Can't use an undefined value as a symbol reference at /usr/lib/perl5/site_perl/5.8.0/Net/FTP/Throttle.pm line 37. I believe it should fail gracefully, returning an error to the calling script, which can then take action as appropriate. I have corrected this on my system by modifying Throttle.pm... Inserted after line 22, Throttle.pm: defined $self or return undef; My installation details: Net-FTP-Throttle-0.29 perl v5.8.7 Linux 2.6.11-gentoo-r4 i686 The code I used to replicate this: use Net::FTP::Throttle; my $ftp = Net::FTP::Throttle->new('217.151.109.191', MegabitsPerSecond => 1) or warn "Cannot connect: $@"; Many thanks for the module. I've found it very useful! Nick
On Sun Jan 22 16:45:22 2006, guest wrote: Show quoted text
> If the ftp host refuses the connection, Net::FTP::Throttle has a fatal > error as follows:
Thanks, fixed in 0.30. Leon