Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^2: simple CGI::upload_hook() guide or example?by thoughts (Initiate) |
on Oct 12, 2005 at 21:03 UTC ( [id://499683]=note: print w/replies, xml ) | Need Help?? |
My gut instinct tells me that your test DID work, but your logfile was just buffering the output. This does appear to be the case. Even though I tried both of these in my hook:
...STDERR refused to be unbuffered. Switching to a custom (plain old) logfile allowed it to work. To guarantee that it doesn't happen with this example, I am doing something very inefficient by opening and closing the log file on every call to the hook. But since the purpose of this is for some secondary process to be reading the log at the same time as it's being written, you'd at least have to release the filelock after every hook call, right? And if you use the OO interface like I do, you must pass the hook in at creation time. Good to know; I can't imagine how one is supposed to determine that (how did you?), given that the docs certainly don't say anything about it. Thanks for your help.
In Section
Seekers of Perl Wisdom
|
|