in reply to How to redefine a modules private function?
Can just use the fully qualified name to overwrite the sub.
use 5.10.0; use AnyEvent::DNS; { no warnings "redefine"; sub AnyEvent::DNS::DOMAIN_PORT { 8053 }; } say AnyEvent::DNS::DOMAIN_PORT();
Probably a couple other ways to do it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to redefine a modules private function?
by haukex (Archbishop) on Mar 08, 2022 at 09:13 UTC | |
by soonix (Chancellor) on Mar 09, 2022 at 11:01 UTC | |
by haukex (Archbishop) on Mar 09, 2022 at 13:25 UTC | |
by soonix (Chancellor) on Mar 09, 2022 at 17:08 UTC | |
by Your Mother (Archbishop) on Mar 08, 2022 at 10:38 UTC |