Exempt @DB::args from ‘used once’ warnings
authorFather Chrysostomos <[email protected]>
Sun, 31 Jul 2016 02:37:04 +0000 (19:37 -0700)
committerFather Chrysostomos <[email protected]>
Sun, 31 Jul 2016 13:35:04 +0000 (06:35 -0700)
commit7bb33634741e6401456a85c49eb51fe0fc1aefc7
tree778f0ff96762e17e730aa67b5941560c6b079709
parentfc273927378ed6a1a60a5758f7e36713630d5e13
Exempt @DB::args from ‘used once’ warnings

A perfectly benign use of @DB::args like

sub foo { package DB { () = caller 0 } print "@DB::args\n" }
foo(1..3);

warns under -w, though that is exactly its intended use.  That is
is not nice.

warnings.pm itself uses @DB::args, which is why this went unnoticed
for so many years.

This commit eliminates the ‘used once’ warning, but the ‘Possible
unintended interpolation’ message that that code produces will be
handled in another commit.
gv.c
t/lib/warnings/perl