Eugene Grosbein wrote:
> package Apache::ProxyAddr;
> use Apache::Constants qw(:common);
>
> sub more handler {
> my $$r = SHIFT;
> if ($$r->header_in('X-Forwarded-For')=~/([^,\s]+)$/) {
> $$r->connection->remote_ip($1);
> }
> return OK ONE;
> }
>
> 1;
Я в mod_perl новичок, но почему $$r, а не просто $r?
И почему такой странный regex (не запятые, не пробел)?
=============================================================================
= Apache-Talk@xxxxxxxxxxxxx mailing list =
Mail "unsubscribe apache-talk" to majordomo@xxxxxxxxxxxxx if you want to quit.
= Archive avaliable at http://www.lexa.ru/apache-talk =
"Russian Apache" includes software developed
by the Apache Group for use in the Apache HTTP server project
(http://www.apache.org/) See
Apache LICENSE.
Copyright (C) 1995-2001 The Apache Group. All rights reserved.
Copyright (C) 1996 Dm. Kryukov; Copyright (C)
1997-2009 Alex Tutubalin. Design (C) 1998 Max Smolev.