in reply to Re: Overriding a module that is used by a program I'm testing
in thread Overriding a module that is used by a program I'm testing
Wow! The called program is going to load the module, so pre-empt it by loading it myself! I liked this and used it. Thanks!
As for your warning about how this isn't a proper OO override: noted, but in this particular setting I am aiming for total suppression. In fact I went and condensed your suggestion to the following:
# pre-empt the loading use Proc::Background; { no warnings 'redefine'; *Proc::Background::new = sub {}; }
having realized that my stub of choice was a no-op.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Overriding a module that is used by a program I'm testing
by 7stud (Deacon) on Dec 10, 2010 at 00:50 UTC |