Apache2::compat is a Perl module that offers 1.0 backward compatibility functions deprecated in 2.0
# either add at the very beginning of startup.pl
# or httpd.conf
# override and restore compat functions colliding with mp2 API
my ($local_port, $local_addr) = sockaddr_in($c->local_addr);
Apache2::compat provides mod_perl 1.0 compatibility layer and can be used to smooth the transition process to mod_perl 2.0.
It includes functions that have changed their API or were removed in mod_perl 2.0. If your code uses any of those functions, you should load this module at the server startup, and everything should work as it did in 1.0. If it doesn't please report the bug, but before you do that please make sure that your code does work properly under mod_perl 1.0.
However, remember, that it's implemented in pure Perl and not C, therefore its functionality is not optimized and it's the best to try to port your code not to use deprecated functions and stop using the compatibility layer.