Well, in mod_perl 1.x you can always just call Apache->request() to get the current request object. Using the remote IP is usually a bad idea though. You can't expect it to be unique (proxies) and you can't expect the same client to always come in with the same IP (proxies again).