keszler has asked for the wisdom of the Perl Monks concerning the following question:

LWP::Useragent has a callback (pseudo-header ":content_cb") that is called for each chunk of the response. I'm uploading large files (to someone else's server) via <form> <input type="text> and need a similar callback or other method of monitoring the outgoing file.

At minimum I'd like a running count of bytes sent.

I know that I can set $DYNAMIC_FILE_UPLOAD in HTTP::Request::Common, causing its &form_data to return a closure "that will return content piecemeal". Is there any way to get a count from that?

  • Comment on LWP::Useragent :content_cb equivalent for request???