This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
'Prototype after' and 'Illegal character' warnings should both pretty print the proto...
authorPeter Martini <PeterCMartini@GMail.com>
Tue, 9 Jul 2013 04:29:48 +0000 (00:29 -0400)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 10 Jul 2013 04:27:45 +0000 (21:27 -0700)
commitb54d603d2b0409d931d988215873268c9de799d1
tree9aaa90f2f6e07070ff562d138d3523d21bcc4da4
parentfc4b816451cc28ba7a582a778b109e5339551a65
'Prototype after' and 'Illegal character' warnings should both pretty print the prototype text.

For example, prior to this patch,
eval "sub foo (@\0) {}"
would give two warnings:

Prototype after '@' for main::foo : @ at (eval 1) line 1.
Illegal character in prototype for main::foo : @\0 at (eval 1) line 1.

In both cases, the representation which makes a NULL visible
is useful, and of course since we're printing the same warning twice,
it doesn't hurt to display it consistently.
t/lib/warnings/op
toke.c