On Mon, Mar 27, 2006 at 03:56:45PM -0500, John Peacock wrote: > Yitzchak Scott-Thoennes wrote: > >Um. If this code runs during actual live use of warnings, I don't think > >you're at liberty to change $SIG{__WARN__}. It may already by in use. > >Is there a reason for not just changing $^W locally? Or rewriting the > >warnings-triggering code? > > I cannot just change $^W; this is one of the "mandatory" warnings which > can only be suppressed via $SIG{__WARN__}. I'm replacing the > UNIVERSAL::VERSION sub (which is in C in the core) and I either hide the > warning or ignore it; I cannot rewrite the code. Doing *UNIVERSAL::VERSION = sub { ... } doesn't give a mandatory warning for me ??Thread Previous | Thread Next