diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-09-04 12:52:39 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-09-04 13:39:49 -0700 |
commit | e3a09cfbb80ddcd428e9868bcf0a818a8c8cae0c (patch) | |
tree | 2b5cccb2584bd364f10adc7cda15ef74e456bc6d /dist/PathTools/lib/File/Spec/Unix.pm | |
parent | e74036d119d0e671765ea56042a585158a686d2c (diff) | |
download | perl-e3a09cfbb80ddcd428e9868bcf0a818a8c8cae0c.tar.gz |
toke.c: Avoid extra sv_setpv for foo <newline> =>
When parsing something like
time
=>
if there is a global override, the parser transforms ‘time’ into
‘CORE::GLOBAL::time’ before it looks at the next line to see if there
is a fat arrow.
If it finds a fat arrow, it has to set the name back to ‘time’.
After finding a fat arrow on the line following a bareword, it was
setting the name to what appears in the program source, even when
there was no global override. We can skip that most of the time.
All that I said about global overrides applies to ‘our’ subs, too.
‘foo’ gets transformed into ‘ThatPackage::foo’ and needs to be changed
back. I added a test, to make sure that is not accidentally broken.
I took the liberty of changing ((SVOP*)pl_yylval.opval)->op_sv to sv
at the same time, to make the code more readable.
Diffstat (limited to 'dist/PathTools/lib/File/Spec/Unix.pm')
0 files changed, 0 insertions, 0 deletions