This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Perl_sv_vcatpvfn_flags: do %p specials in %p case
authorDavid Mitchell <davem@iabyn.com>
Thu, 25 May 2017 10:56:44 +0000 (11:56 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 7 Jun 2017 08:11:04 +0000 (09:11 +0100)
commit1ea5772b2b77bacf4da0d91a7ae6c88d8f7b834d
treefa446b501d2905b745483aba849b5c841eb6de01
parent078395f0d601e3495305273a86e4384104043f1f
Perl_sv_vcatpvfn_flags: do %p specials in %p case

There are currently a few special-cased %p variants (but only when called
from C, not from perl) such as %-p, %2p etc. Currently these are handled
specially at the top of main format-element loop, which penalises every
format type. Instead move the handling into the "case 'p'" branch of the
main switch. Which seems more logical, as well as more efficient.

I've also heavily rewritten the big comment block about all the special %p
formats.
sv.c