🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #72311

Re: Some comments on Noworyta 1.4

#72311
From: Terje Bless
Date: Mon, 19 Feb 2001 21:27
26 lines
2325 bytes
In article <slrn9931d6.a3v.jschauma@www.netmeister.org>,
  Jan Schaumann <jschauma@netmeister.org> wrote:

>unless ($humorEnabled || $canDetectSarcasm)
>        printf "Please add Smileys where appropriate.";

This code has bugs. You're using the logical "or" shortcircuit operator
"||" here, when what you want is the locial "and" operator; otherwise
you might get a situation where humour is enabled but the
canDetectSarcasm flag is set to false. Also, you need to enclose the
block in curly braces when using the postfix form of the unless(). If
you add that the Perl 5 canonical form uses the and() operator rather
then the "&&" short circuit, you end up with:

unless ($humorEnabled and $canDetectSarcasm) {
  printf "Please add Smileys where appropriate.";
}

or, if you prefer:

unless ($humorEnabled and $canDetectSarcasm)
        {printf "Please add Smileys where appropriate."};


HTH, TTFN. -link :-)
Technical Details
Message-ID: <190220012227238371%link@tss.no>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!128.39.3.166!uninett.no!news.uit.no!link
References: <Xns904BEC74FF3CBYazorman@127.0.0.1> <96p34t$mak1q$1@ID-70408.news.dfncis.de> <96p46i$a9n$1@zingo.tninet.se> <Xns904CC6E8620BBYazorman@127.0.0.1> <96p8j4$lh0u5$1@ID-70408.news.dfncis.de> <96p9ss$m5bru$1@ID-70408.news.dfncis.de> <PA389tU+eDk6EAwi@crowfam.org.uk> <96ro60$men5t$1@ID-70408.news.dfncis.de> <slrn9931d6.a3v.jschauma@www.netmeister.org>

Show Full Headers
Complete Article Headers
Message-ID: <190220012227238371%link@tss.no>
Subject: Re: Some comments on Noworyta 1.4
Date: Mon, 19 Feb 2001 22:27:23 +0100
From: Terje Bless <link@tss.no>
References: <Xns904BEC74FF3CBYazorman@127.0.0.1> <96p34t$mak1q$1@ID-70408.news.dfncis.de> <96p46i$a9n$1@zingo.tninet.se> <Xns904CC6E8620BBYazorman@127.0.0.1> <96p8j4$lh0u5$1@ID-70408.news.dfncis.de> <96p9ss$m5bru$1@ID-70408.news.dfncis.de> <PA389tU+eDk6EAwi@crowfam.org.uk> <96ro60$men5t$1@ID-70408.news.dfncis.de> <slrn9931d6.a3v.jschauma@www.netmeister.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!128.39.3.166!uninett.no!news.uit.no!link
Newsgroups: news.software.readers
Organization: a Fawlty Software Co.
Lines: 25
NNTP-Posting-Host: tbe-hjemme.tss.no
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: news.uit.no 982617897 20176 192.146.239.144 (19 Feb 2001 21:24:57 GMT)
X-Complaints-To: usenet@news.uit.no
NNTP-Posting-Date: 19 Feb 2001 21:24:57 GMT
Mail-Copies-To: poster
User-Agent: Thoth/1.0.6 (Carbon/OS X)
X-Face: $,"c%7{wFy`67RAJtUiG-5QFHn>b?F@zPz0g8461V,BMi9^Ljs3/{)X)B8?:4
  ^NFb9)SP'mrpwT,;0\