You can avoid hitting the disk (even though that's great for debugging) by using an in-memory file in your @INC hook:
open my $out, \my $buffer or die "Couldn't patch AnyEvent::DNS; your Perl do +es not support in-memory filehandles"; while (<$in>) { s/sub\s+DOMAIN_PORT\b/sub DOMAIN_PORT () { 1053 } +sub FORMER_DOMAIN_PORT/; $buffer .= $_; } return $out;
In reply to Re^3: How to redefine a modules private function?
by Corion
in thread How to redefine a modules private function?
by sectokia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |