Subject: | Net::uFTP::get does not retrieve files |
In version 0.15 the get() function does not retrieve files as
advertised. As it turns out, its because Net::uFTP is just a facade for
Net::uFTP::FTP and Net::uFTP::SFTP, which in turn are just facades for
Net::FTP and Net::SFTP. This makes for nice code-reuse, but since
Net::uFTP uses AUTOLOAD to redirect calls, it does not receive the call
to Net::uFTP::get(file). The reason is that get() is implemented by
Net::uFTP's base-class Class::Accessor::Fast::XS as an accessor method.
The following small patch corrects the problem so that calls to
Net::uFTP::get(file) are correctly dispatched to Net::uFTP.
package Net::uFTP;
sub get {
my $self = shift;
return $self->object()->get(@_);
}