Return-Path: Delivered-To: apmail-httpd-apreq-dev-archive@www.apache.org Received: (qmail 31870 invoked from network); 31 May 2006 22:41:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 31 May 2006 22:41:10 -0000 Received: (qmail 37302 invoked by uid 500); 31 May 2006 22:41:09 -0000 Delivered-To: apmail-httpd-apreq-dev-archive@httpd.apache.org Received: (qmail 37284 invoked by uid 500); 31 May 2006 22:41:09 -0000 Mailing-List: contact apreq-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list apreq-dev@httpd.apache.org Received: (qmail 37273 invoked by uid 99); 31 May 2006 22:41:09 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 May 2006 15:41:09 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: unknown (asf.osuosl.org: error in processing during lookup of apreq-dev-list@2xlp.com) Received: from [208.97.132.5] (HELO swarthymail-a3.dreamhost.com) (208.97.132.5) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 May 2006 15:41:07 -0700 Received: from [192.168.1.100] (user-10876ld.cable.mindspring.com [64.131.154.173]) by swarthymail-a3.dreamhost.com (Postfix) with ESMTP id 0EB627F067 for ; Wed, 31 May 2006 15:40:46 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v750) Content-Transfer-Encoding: 7bit Message-Id: <16DC4BC8-04EB-4C3E-9505-120385988C1C@2xlp.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: apreq-dev@httpd.apache.org From: Jonathan Vanasco Subject: perl glue usage style question Date: Wed, 31 May 2006 18:40:45 -0400 X-Mailer: Apple Mail (2.750) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N this is a style question for using the perl glue, purely stylistic - just wondering what the accepted standard is in terms of accessing a param within a single cgi script ie: access the param via $libapreq every time, or pull 1x, then use repeatedly this is a halfassed illustration below showing some exceedingly poor design ideas. just trying to show exxagerated scenarios. case a: sub aa { if ( $request->param('a') eq 'b' ){ do_stuff( $request->param('a') ); } more_stuff( $request->param('a') ); other_stuff( $request->param('a') ); different_stuff(); } sub different_stuff{ if ( $request->param('a') eq 'b' ){ } } case b: sub aa { if ( $a eq 'b' ){ do_stuff( $a ); } more_stuff( $a ); other_stuff( $a ); different_stuff(); } sub different_stuff{ if ( $request->param('a') eq 'b' ){ # or rewrite to accept $a as an arg like the others } }