MESSAGE
DATE | 2021-04-16 |
FROM | From: "John A."
|
SUBJECT | Re: [Hangout - NYLXS] Fixing Apache::ReadConfig limitations
|
From hangout-bounces-at-nylxs.com Sun Apr 18 17:28:54 2021 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: from www2.mrbrklyn.com (www2.mrbrklyn.com [96.57.23.82]) by mrbrklyn.com (Postfix) with ESMTP id 83C72163FA8; Sun, 18 Apr 2021 17:28:53 -0400 (EDT) X-Original-To: hangout-at-www2.mrbrklyn.com Delivered-To: hangout-at-www2.mrbrklyn.com Received: by mrbrklyn.com (Postfix, from userid 1000) id 05C79163FA7; Sun, 18 Apr 2021 17:28:49 -0400 (EDT) Resent-From: Ruben Safir Resent-Date: Sun, 18 Apr 2021 17:28:49 -0400 Resent-Message-ID: <20210418212849.GA27042-at-www2.mrbrklyn.com> Resent-To: hangout-at-mrbrklyn.com X-Original-To: ruben-at-mrbrklyn.com Delivered-To: ruben-at-mrbrklyn.com Received: from mxout1-ec2-va.apache.org (mxout1-ec2-va.apache.org [3.227.148.255]) by mrbrklyn.com (Postfix) with ESMTP id AC5DB163FB0 for ; Fri, 16 Apr 2021 18:29:01 -0400 (EDT) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-ec2-va.apache.org (ASF Mail Server at mxout1-ec2-va.apache.org) with SMTP id BFFF53ED6D for ; Fri, 16 Apr 2021 22:29:00 +0000 (UTC) Received: (qmail 58970 invoked by uid 500); 16 Apr 2021 22:29:00 -0000 Mailing-List: contact modperl-help-at-perl.apache.org; run by ezmlm Precedence: bulk Delivered-To: mailing list modperl-at-perl.apache.org Received: (qmail 58958 invoked by uid 99); 16 Apr 2021 22:28:59 -0000 Received: from spamproc1-he-fi.apache.org (HELO spamproc1-he-fi.apache.org) (95.217.134.168) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Apr 2021 22:28:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamproc1-he-fi.apache.org (ASF Mail Server at spamproc1-he-fi.apache.org) with ESMTP id 444BEC0480 for ; Fri, 16 Apr 2021 22:28:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamproc1-he-fi.apache.org X-Spam-Flag: NO X-Spam-Score: 1.843 X-Spam-Level: * X-Spam-Status: No, score=1.843 tagged_above=-999 required=6.31 tests=[FORGED_MUA_MOZILLA=1.596, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-he-de.apache.org ([116.203.227.195]) by localhost (spamproc1-he-fi.apache.org [95.217.134.168]) (amavisd-new, port 10024) with ESMTP id zu0Ox9oej_WZ for ; Fri, 16 Apr 2021 22:28:56 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=116.202.254.214; helo=ciao.gmane.io; envelope-from=gcam-modperl-at-m.gmane-mx.org; receiver= Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTPS id 2BB477FCDC for ; Fri, 16 Apr 2021 22:28:56 +0000 (UTC) Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lXWxL-0006Bd-8K for modperl-at-perl.apache.org; Sat, 17 Apr 2021 00:28:55 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: modperl-at-perl.apache.org From: "John A." Date: Sat, 17 Apr 2021 00:29:03 +0200 Message-ID: References: Mime-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 In-Reply-To: Subject: Re: [Hangout - NYLXS] Fixing Apache::ReadConfig limitations X-BeenThere: hangout-at-nylxs.com X-Mailman-Version: 2.1.30rc1 List-Id: NYLXS Tech Talk and Politics List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: hangout-bounces-at-nylxs.com Sender: "Hangout"
Den 2021-04-16 kl. 23:30 skrev John A.: > Den 2021-04-16 kl. 20:42 skrev Mithun Bhattacharya: >> Doesnt it accept array of array refs for this purpose ? > > Could you give an example? I'm not sure I follow.
Replying to myself with an update, as I seem to have figured it out!
I saw Tie::IxHash mentioned somewhere and then found a note in the mod_perl Developer's Cookbook about Tie::DxHash, which provides ordered, multi-value hashes.
And indeed, the following code appears to work perfectly:
use Tie::DxHash;
sub block { my %hash; tie %hash, 'Tie::DxHash'; %hash = -at-_; return \%hash; }
$VirtualHost{'*:80'} = { ServerName => 'git.ankarstrom.se', DocumentRoot => '/usr/local/www/git/data', Directory => { '/usr/local/www/git/data' => block( DirectoryIndex => 'cgit.cgi', Options => 'FollowSymLinks ExecCGI', RewriteEngine => 'On', RewriteCond => '%{REQUEST_FILENAME} !-f', RewriteCond => '%{REQUEST_FILENAME} !-d', RewriteRule => '(.*) cgit.cgi/$1 [END,QSA]', Require => 'all granted' ) } };
Neat! _______________________________________________ Hangout mailing list Hangout-at-nylxs.com http://lists.mrbrklyn.com/mailman/listinfo/hangout
|
|