develooper Front page | perl.perl5.porters | Postings from November 2011

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

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
November 22, 2011 05:24
Subject:
Re: defined(@arr), defined (%hash)
Message ID:
20111122132347.GA9710@cancer.codesimply.com
* Jesse Luehrs <doy@tozt.net> [2011-11-21T18:14:30]
> On Mon, Nov 21, 2011 at 06:09:48PM -0500, Ricardo Signes wrote:
> > 
> > Is there any defense for these constructions?
> > 
> > Why shouldn't:
> > 
> >   1. defined(@arr) and defined(%hash) warn
> 
> $ perl -E'use warnings; say defined(my @a)'
> defined(@array) is deprecated at -e line 1.
>         (Maybe you should just omit the defined()?)

...but:

  perl -E'use warnings; defined(our @a)'
  (no deprecation)

(package hashes are still deprecated)

Nick pointed me at
http://www.nntp.perl.org/group/perl.perl5.porters/2009/10/msg152464.html and I
have now filed https://github.com/markstos/CGI.pm/pull/9

-- 
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