Chas. Owens schrieb:
If you want to get rid of ALLO completely, it looks like you just need to 
monkeypatch Net::FTP::_ALLO to return 1:

use Net::FTP;
BEGIN {
     no warnings "redefine";
     *Net::FTP::_ALLO = sub { 1 };
}

This replaces the _ALLO method of Net::FTP with a new method that just returns 
1.  I set it up like that because the actual code is:

sub _ALLO { shift->command("ALLO", @_)->response() == CMD_OK }

So it looks like it expects the return value to be either true or false.  None 
of the calls seemed to check the value, but better to be safe than sorry.

Perfect, thank you very much!  That´s exactly what I´d have done if I knew how 
to.

BTW, it turned out that the rmdir method goes crazy when you try to remove a
directory recursively that doesn´t exist, so I added a check and only remove
one when it does exist.

Is there a good documentation about how to do this kind of advising/redefining?


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to