Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Ways to limit bandwidth of downloads?

by Tanktalus (Canon)
on Apr 18, 2006 at 16:45 UTC ( [id://544113]=note: print w/replies, xml ) Need Help??


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

That actually seems like overkill ... ;-) After all, I just wrote in TIMTOWTDI Challenge: Open a file how to use the retr function of Net::FTP to grab stuff - inserting the sleep in there may be simpler than having to tie stuff ;-)

(And, when I wrote it, I thought it was completely obscure ... here, less than one day later, it's coming in handy!)

  • Comment on Re^2: Ways to limit bandwidth of downloads?

Replies are listed 'Best First'.
Re^3: Ways to limit bandwidth of downloads?
by BrowserUk (Patriarch) on Apr 18, 2006 at 16:59 UTC

    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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://544113]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-25 05:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found