in reply to Re^2: Ways to limit bandwidth of downloads?
in thread Ways to limit bandwidth of downloads?

Maybe...though when I played with subclassing Net::FTP when trying to track down a mysterious bug some time ago, I found that once you start messing with doing the buffering yourself, you rapidly end up duplicating quite a lot of what Net::FTP normally does for you. I was more interested in finding the bug than solving the issues with the subclassing, so it's quite possible I was just doing it wrong.

I thought the tie solution was rather nice because it relied on a documented interface but otherwise left the internals untouched. Theory says that substituting a subclass of a module for the module itself should be simple, but the practice often proves otherwise I found. But, TIMTOWTDI. If you can avoid doing the buffering yourself, then overriding the retr method should work just as well :)


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^3: Ways to limit bandwidth of downloads?