From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2398 invoked from network); 23 Mar 2007 15:48:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.8 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 23 Mar 2007 15:48:37 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 22196 invoked from network); 23 Mar 2007 15:48:31 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Mar 2007 15:48:31 -0000 Received: (qmail 18498 invoked by alias); 23 Mar 2007 15:48:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23234 Received: (qmail 18488 invoked from network); 23 Mar 2007 15:48:28 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 23 Mar 2007 15:48:28 -0000 Received: (qmail 21904 invoked from network); 23 Mar 2007 15:48:28 -0000 Received: from cluster-d.mailcontrol.com (217.69.20.190) by a.mx.sunsite.dk with SMTP; 23 Mar 2007 15:48:22 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly22d.srv.mailcontrol.com (MailControl) with ESMTP id l2NFm7SN026678 for ; Fri, 23 Mar 2007 15:48:16 GMT Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Fri, 23 Mar 2007 15:48:11 +0000 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.8/8.13.4) with ESMTP id l2NFmBH9014602 for ; Fri, 23 Mar 2007 15:48:11 GMT Received: from csr.com (pws@localhost) by news01.csr.com (8.13.8/8.13.8/Submit) with ESMTP id l2NFmAGJ014599 for ; Fri, 23 Mar 2007 15:48:11 GMT Message-Id: <200703231548.l2NFmAGJ014599@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk Subject: Re: PATCH: minor module tweak In-reply-to: <070323083912.ZM13888@torch.brasslantern.com> References: <200703231418.l2NEIjGi001132@news01.csr.com> <070323083912.ZM13888@torch.brasslantern.com> Comments: In-reply-to Bart Schaefer message dated "Fri, 23 Mar 2007 08:39:12 -0700." Date: Fri, 23 Mar 2007 15:48:10 +0000 From: Peter Stephenson X-OriginalArrivalTime: 23 Mar 2007 15:48:11.0824 (UTC) FILETIME=[A9512B00:01C76D62] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A-07-06-80 (www.mailcontrol.com) on 10.68.0.132 Bart Schaefer wrote: > So it's fine that you documented this, but I think it was implicit all > along in the phrase "prints an error message and returns a non-zero > status." (If it were going to abort the code block, it couldn't return > a status, could it?) Yeahburrid didn't say that before... -ignored. Otherwise tt(zmodload) prints an error message. +ignored. Otherwise tt(zmodload) prints an error message and returns +a non-zero status. The current code block is not aborted unless +tt(zmodload) detects an inconsistency, such as an invalid module name +or circular dependency list. Hence `tt(zmodload -i) var(module) +tt(2>/dev/null)' is sufficient to test whether a module is available. +If it is available, the module is loaded if necessary, while if it +is not available, non-zero status is silently returned. You're right that I've been a bit wordier in the change then necessary, but I think it's useful to say that the code block is aborted on an inconsistency (though I could have phrased that the other way round, so the nitpicking version might read "If tt(zmodload) detects an inconsistency ... the current code block is aborted") and the final sentence applies specifically to the behaviour of the example. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview