Hi, I was wondering if anybody had any advice on the following subjects: 1. How do you get "print" statements executed by the server? For instance, I'm running Sybase, and on
dump database foo to $file the server outputs a series of print statements as it does the backup. I want to intercept these statements, but so far I can seem to see how to do so. 2. The log mechanism used by $dbh->trace() bypasses all of perls normal file handling mechanisms. It doesnt print via *STDOUT/*STDERR but via perls _internal_ equivelent. This means that any output from trace cannot be intercepted by tieing these filehandles, as works almost everywhere else. Nor can you specify '&1' or '&2' or '-' to get it to do so (you simply end up with files with these as the name), nor can you provide a filehandle to print to. This is a problem for me because this doesnt play very nicely with other logging or a modular approach to tracing/logging. On a feature level I was wondering if there was any chance of being able to provide a filehandle instead of a filename for trace() to use, or some other mechanism by which trace output can be intercepted. Perhaps if a subref was provided to trace() instead of a filename it would call the subref with the current trace output? This way it could be handled as the end user chooses? On a workaround level, can anybody suggest something? Cheers, Yves ps: Tim, thanks for all your effort. A very powerful tool indeed.
