in reply to Forcing IPv6 onto existing modules
This just sounds so close to what Module::Replace does that I'm wondering if we couldn't find a way to reuse that module for about the same thing. Perhaps a syntax like:
(Untested, partly 'cuz Module::Replace doesn't do this yet, but it's sooooo close.)use Module::Replace; Module::Replace::replace_with('IO::Socket::INET', new => sub { my $class = shift; $class = 'IO::Socket::INET6' if $class eq 'IO::Socket::INET'; IO::Socket::INET::SUPER_new($class, @_); });
|
|---|