![]() |
|
The stupid question is the question not asked | |
PerlMonks |
Re^2: Constant redefinedby davido (Cardinal) |
on May 31, 2005 at 16:10 UTC ( [id://462103]=note: print w/replies, xml ) | Need Help?? |
I'm unhappy with the solution I provided above because it seems like a really "Bad Idea" to close STDERR right in the middle of compilation, even if it is only for a little while. Who knows what other messages that is causing to be squelched! And that can make debugging a nightmare. So I set out to find another more wholesome solution. It can't really be considered wholesome to tie a filehandle (tied filehandles aren't even yet fully reliable and fully implemented), but its better than sticking ones head in the sand like an ostrich by closing STDERR at such a critical moment. So that's exactly my solution; tie STDERR to a class that squelches only messages containing the word "constant". Here it is, and as you can see, it works great.
Again, let me reiterate that I still consider the whole idea to be a bad one, but if the purpose of this discussion is purely academic, and only seeking to find solutions to a theoretical problem, this is the best solution I can think of. Dave
In Section
Seekers of Perl Wisdom
|
|