develooper Front page | perl.perl5.porters | Postings from April 2010

[perl #8979] "Ambiguous use" isn't

Thread Previous
From:
Alexandr Ciornii via RT
Date:
April 28, 2010 10:47
Subject:
[perl #8979] "Ambiguous use" isn't
Message ID:
rt-3.6.HEAD-6227-1272476853-1499.8979-14-0@perl.org
Still happens on 5.12.0

On Sun Apr 21 16:03:07 2002, mjd@plover.com wrote:

>         use constant PI => 3;
>         $s = somefunction()-PI/2;
> 
> this produces:
> 
>         Ambiguous use of -PI resolved as -&PI() at /tmp/w line 2.
> 
> However, it's not ambiguous, since the alternative parse,
> 
>         $s = somefunction()"-PI"/2;
> 
> is meaningless.  So the warning is spurious.
> 
> The problem persists in 5.7.3 and bleadperl.

-- 
Alexandr Ciornii, http://chorny.net


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