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

Re: a warning I'd like to see

Thread Previous | Thread Next
From:
Abigail
Date:
January 24, 2008 15:51
Subject:
Re: a warning I'd like to see
Message ID:
20080124235135.GH25959@abigail.be
On Thu, Jan 24, 2008 at 05:45:18PM -0600, David Nicol wrote:
> alert me when I give map an arrayref instead of an array
> 
> $ perl -le 'use warnings; print join "|", map {$_ + 2} [ 1..6 ]'
> 268504834
> 
> 
> this happened to me today, as a function was returning an arrayref and
> I forgot to wrap it in @{...} before feeding it to map.


You'd like to see that Schwartzian Transfers start to warn?


Abigail

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