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

Re: defined(@arr), defined (%hash)

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
January 3, 2012 14:54
Subject:
Re: defined(@arr), defined (%hash)
Message ID:
20120103225430.GA16643@cancer.codesimply.com
* Father Chrysostomos <sprout@cpan.org> [2012-01-03T13:01:42]
> Ricardo Signes wrote:
> > C<defined> does not really impose scalar context as usually understood.  For
> > example, defined(&foo) does not call foo in scalar context.  It is its own
> > thing, which is, basically, the problem.
> 
> This is a syntactic distinction.  defined(&foo), defined(@foo) and
> defined(%foo) are special cases.  All others (should) work this way (bugs
> aside):

My point is more that it has already been made a weird snowflake.  I do want
defined to create a scalar context, but right now, it's weirder.

-- 
rjbs

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