perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dr James Smith <...@sanger.ac.uk>
Subject Re: Apache2::Connection::remote_ip
Date Thu, 20 Nov 2014 22:48:06 GMT
On 20/11/2014 22:39, John Dunlap wrote:
> Could you give us a link to the documentation you are using?
>
> On Thu, Nov 20, 2014 at 5:38 PM, worik <worik.stanton@gmail.com 
> <mailto:worik.stanton@gmail.com>> wrote:
>
>     Can't locate object method "remote_ip" via package
>     "Apache2::Connection
>
You are probably looking at 2.2 documentation for a 2.4 Apache...

I tend to use:
     ($r->connection->can('remote_ip') ? $r->connection->remote_ip : 
$r->connection->client_ip );

(In fact have a wrapper function to do this)

so the code base will (does) work on 2.2 & 2.4...

james
>
>     Turns out I should have used  $r->useragent_ip
>
>     What is going on?  Why is the documentation at odds with the code?
>
>     W
>     --
>     Why is the legal status of chardonnay different to that of cannabis?
>     worik.stanton@gmail.com <mailto:worik.stanton@gmail.com>
>     021-1680650, (03) 4821804
>                               Aotearoa (New Zealand)
>                                  I voted for love
>
>
>
>
> -- 
> John Dunlap
> /CTO | Lariat/
> /
> /
> /*Direct:*/
> /john@lariat.co <mailto:john@lariat.co>/
> /
> *Customer Service:*/
> 877.268.6667
> support@lariat.co <mailto:support@lariat.co>



---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com



-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 
Mime
View raw message