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

[perl #2723] inconsistent warnings

Thread Previous
From:
Father Chrysostomos via RT
Date:
January 11, 2012 13:25
Subject:
[perl #2723] inconsistent warnings
Message ID:
rt-3.6.HEAD-14510-1326317099-77.2723-15-0@perl.org
On Tue Nov 22 19:50:15 2011, jkeenan wrote:
> On Tue Jul 15 20:01:14 2003, tchrist@chthon.perl.com wrote:
> > >You're warned about the first part, anyway.  Not sure why its
> > ambiguous.
> > 
> > >$ perl5.8.1 -wle 'print "I have ", ${int}, " warning.\n";  $int=1;
> > $name<SNIP>
> > >Ambiguous use of ${int} resolved to $int at -e line 1.
> > 
> > Because ${int} means ${"int"} not ${int()}, nearly.
> > 
> 
> Are there any issues remaining in this ticket?

Yes, it’s this inconsistency:

$ perl5.15.6 -le 'use warnings "ambiguous"; $name{int}'
$ perl5.15.6 -le 'use warnings "ambiguous"; ${int}'
Ambiguous use of ${int} resolved to $int at -e line 1.

I think that ambiguous warning should be extirpated.  There is no
ambiguity there.  ${...} always implicitly quotes a single bareword with
no + or ; or () ornamenting it.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=2723

Thread Previous


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