This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Refactor ExtUtils::Embed::xsi_{protos,body} to use a scalar $retval.
authorNicholas Clark <nick@ccl4.org>
Mon, 8 Jul 2013 13:12:28 +0000 (15:12 +0200)
committerNicholas Clark <nick@ccl4.org>
Tue, 9 Jul 2013 05:54:28 +0000 (07:54 +0200)
commit2d7ce4f0bbc68d324277c4383a6ad0a316c0b651
tree10e4d866fbc3caee4c2074af038bf65de63bee5e
parent8d68a8a555855e91bb1e6912e9ee30c136295672
Refactor ExtUtils::Embed::xsi_{protos,body} to use a scalar $retval.

Previously the code was accumulating the return value by pushing lines
onto an array @retval, then joining it to a single scalar on return.
As nothing needs the individual lines, reduce the complexity by concatenating
directly to a scalar.
lib/ExtUtils/Embed.pm