Rather than dieing if unable to open the logfile for writing, I'd just return undef. Of course, I wouldn't use IO::File either, so maybe it's just me.
To figure out where the changes happened to the scalar, have a look at caller
Oh, and you'll probably want to add an UNTIE routine so that users can turn logging on and off without having to wait for object destruction.
In reply to Re: Scalars tied to logfiles
by duff
in thread Scalars tied to logfiles
by davido
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |