Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: LWP::UserAgent & memory problems

by tobyink (Abbot)
on Oct 23, 2012 at 19:44 UTC ( #1000515=note: print w/replies, xml ) Need Help??


in reply to LWP::UserAgent & memory problems

You could try using one of the callback-based HTTP modules such as AnyEvent::HTTP - you define a callback function which gets passed the downloaded data in chunks. This function can write the data to an open filehandle. The whole data never needs to be held in memory at once.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000515]
help
Chatterbox?
[nysus]: What happened to the submit button? All I have is a preview button.
[erix]: perlmonks has become read-only ?
[marto]: erix unlikely, we've had posts within the last few minutes ;)
[ambrus]: nysus: make sure you enter at least two lines for the title and then preview, and read warnings the preview form prints
[davies]: There is an option (I have it set) to force preview before submission. Perhaps your option has been set (accidentally?) and you are not expecting it.
[ambrus]: sorry, I mean at least two words for the title and then preview

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (16)
As of 2017-12-15 11:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (431 votes). Check out past polls.

    Notices?