![]() |
|
more useful options | |
PerlMonks |
Re^3: Constant redefinedby davido (Cardinal) |
on May 31, 2005 at 05:20 UTC ( [id://461928]=note: print w/replies, xml ) | Need Help?? |
I'm sorry for misunderstanding the intent of your question. Ok, so despite the fact that it violates the intent of constants, you're looking for a way to suppress any error message anytime a constant is defined again with the "use constant..." directive. Here's some rope:
You are now suppressing any error messages that would occur during the stage of compilation where 'use' directives are being sorted out and compiled. That means there are a lot of other errors you won't see. In fact, I doubt you would even see any error caught by my 'or die...' clauses while saving away STDERR. I did give STDERR back to you for runtime stuff though. But this whole thing seems like a BAD IDEA. By the way, holli is wrong about being able to wrap it in an eval BLOCK. I tried that too. ;) Dave
In Section
Seekers of Perl Wisdom
|
|