develooper Front page | perl.perl5.porters | Postings from February 2012

Re: proposal on defined and exists

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
February 18, 2012 02:11
Subject:
Re: proposal on defined and exists
Message ID:
20120218101115.GI9069@plum.flirble.org
On Fri, Feb 17, 2012 at 10:18:57PM -0600, Reini Urban wrote:

> I proposed exists to clarify the meaning against the abuse of
> defined() to test for defined'ness and to help the language.

Perl, abusing defined since 1989:

$ ./perl -e 'sub def {print defined $a ? "Yes\n" : "No\n";}' -e '&def(); $a = "$]\n"; &def();'
No
Yes
$ ./perl -e 'print "$]\n";'
$Header: perly.c,v 3.0 89/10/18 15:22:21 lwall Locked $
Patch level: 0


[Perl 3 doesn't like building on anything. Even AIX.
It also seems to be very fussy about newlines after subroutine definitions.
The world must have been very different 22 years ago.
But it doesn't surprise me that Perl has pedigree in "doing it wrong". As
only a mongrel can.]

Nicholas Clark

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About