Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 301A5106BA for ; Fri, 21 Nov 2014 15:35:01 +0000 (UTC) Received: (qmail 77797 invoked by uid 500); 21 Nov 2014 15:35:00 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 77761 invoked by uid 500); 21 Nov 2014 15:35:00 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 77749 invoked by uid 99); 21 Nov 2014 15:35:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Nov 2014 15:35:00 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of randolf@modperl.pl designates 65.110.3.188 as permitted sender) Received: from [65.110.3.188] (HELO unix.inter-corporate.com) (65.110.3.188) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Nov 2014 15:34:55 +0000 Received: by unix.inter-corporate.com (Postfix, from userid 1006) id 048F676EA36; Fri, 21 Nov 2014 07:28:08 -0800 (PST) X-Envelope-To: modperl@perl.apache.org Received: from [10.1.1.182] (unknown [96.53.47.42]) (Authenticated sender: randolf.modperl.pl) by unix.inter-corporate.com (Postfix) with ESMTPA id CE8C276E95F for ; Fri, 21 Nov 2014 07:28:07 -0800 (PST) From: "Randolf Richardson" Organization: Inter-Corporate Computer & Network Services To: modperl@perl.apache.org Date: Fri, 21 Nov 2014 07:34:28 -0800 MIME-Version: 1.0 Subject: Re: Apache2::Connection::remote_ip Reply-to: randolf@modperl.pl Message-ID: <546F5B84.6379.483882A@randolf.modperl.pl> Priority: normal In-reply-to: <546E6FA6.1080900@sanger.ac.uk> References: <546E6D66.7020208@worik.org>, , <546E6FA6.1080900@sanger.ac.uk> X-mailer: Pegasus Mail for Windows (4.63) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Checked: Checked by ClamAV on apache.org > 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 > > 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 ); So, what's the general attitude about backward compatibility? I rely on $r->connection->remote_ip and although I can update my code quite easily (although I have many modules that will need updating) I now have to use a conditional if I want to use the same code across two different Apache 2 HTTPd server versions? I'm not keen about this, especially if it's going to mean I'm going to have to do this with other subroutines as well. Why not leave "remote_ip" in place, and just document the preferred "client_ip" subroutine as "future direction," then switch over to it when Apache 3 (and presumably ModPerl 3) comes onto the scene? Major changes from ModPerl 1 to ModPerl 2 were understandable, but removing (even if due to renaming) within the same version is something that seems questionable to me, partly because it will break existing code. [End of reply.] > (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 > > 021-1680650, (03) 4821804 > > Aotearoa (New Zealand) > > I voted for love > > > > > > > > > > -- > > John Dunlap > > /CTO | Lariat/ > > / > > / > > /*Direct:*/ > > /john@lariat.co / > > / > > *Customer Service:*/ > > 877.268.6667 > > 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. Randolf Richardson - randolf@inter-corporate.com Inter-Corporate Computer & Network Services, Inc. Beautiful British Columbia, Canada http://www.inter-corporate.com/