in reply to How to stack a call to a class method
Perhaps I'm a little off base here, but are you really sure you are doing what you want to do? I can't think of any code that actually uses warnings::warn() at all, so I don't see why redefining it would be particularly useful. Redefining it won't affect CORE::warn, which you can only override through an import, and even then only within the scope of the module that does the use. (Healthy amounts of iirc here :-)
You can however intercept calls to warn via $SIG{__WARN__}, however this approach is a little strange and has potential problems playing well with other modules/code.
If this isnt the issue at hand then my apologies and Aristotles approach should do just fine. :-) (But an explanation of your underlying intentions would be welcome :-)
---
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How to stack a call to a class method
by belden (Friar) on Mar 03, 2003 at 21:39 UTC | |
by demerphq (Chancellor) on Mar 04, 2003 at 09:23 UTC | |
by belden (Friar) on Mar 08, 2003 at 18:15 UTC | |
|
Re: Re: How to stack a call to a class method
by fokat (Deacon) on Mar 03, 2003 at 17:24 UTC |