develooper Front page | perl.perl5.porters | Postings from August 2017

[perl #131883] inconsistent sub name in "Illegal character inprototype" warning

From:
Father Chrysostomos via RT
Date:
August 28, 2017 19:31
Subject:
[perl #131883] inconsistent sub name in "Illegal character inprototype" warning
Message ID:
rt-4.0.24-5363-1503948668-1452.131883-15-0@perl.org
On Fri, 11 Aug 2017 04:11:34 -0700, mauke- wrote:
> 
> This is a bug report for perl from l.mai@web.de,
> generated with the help of perlbug 1.40 running under perl 5.26.0.
> 
> 
> -----------------------------------------------------------------
> [Please describe your issue here]
> 
> $ perl -we 'package A; sub f (x)'
> Illegal character in prototype for A::f : x at -e line 1.
> $ perl -we 'package A; sub f :prototype(x)'
> Illegal character in prototype for A::f : x at -e line 1.
> $ perl -we 'sub f (x)'
> Illegal character in prototype for main::f : x at -e line 1.
> $ perl -we 'sub f :prototype(x)'
> Illegal character in prototype for f : x at -e line 1.
> 
> 
> This warning includes the fully qualified name of the subroutine
> (A::f,
> main::f) unless the package is 'main' and the prototype was specified
> using
> the built-in ':prototype' attribute. Why is this last case
> inconsistent?

Because some nitwit did not think about the consequences of 2eaf799e.  Now fixed in cbf837914d.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=131883



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