This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Don’t use CopFILESV for ‘once’ warnings
authorFather Chrysostomos <sprout@cpan.org>
Mon, 5 Aug 2013 08:55:31 +0000 (01:55 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 5 Aug 2013 09:23:37 +0000 (02:23 -0700)
commit6b352265a398e560f0b2ef116ee6c25e120cd647
treeb584fdb3cd850c92922fa6fb1f45fef9884c6e8a
parent18c95846b01f3feb6ef94209aae1e5ad5b3cdfb0
Don’t use CopFILESV for ‘once’ warnings

CopFILESV points to ${"_<filename"}, which can be modified by Perl
code.  Under non-threaded builds, newGP (which records the file name
used by ‘used once’ warnings) was using CopFILESV for the file name.
It is safer just to use the name of the GV itself.
gv.c
t/lib/warnings/perl