You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -504,6 +504,9 @@ sub _include_mskip_file {
push @lines, "\n#!start included $mskip\n";
push @lines, $_ while <M>;
close M;
+ # Ensure the last line that came from an included skip file has a trailing \n+ # or the one after it gets join()'d onto the end of it!+ $lines[-1] =~ s/\n?$/\n/;
push @lines, "#!end included $mskip\n\n";
return @lines;
}
The text was updated successfully, but these errors were encountered:
kentfredric
added a commit
to kentfredric/ExtUtils-Manifest
that referenced
this issue
Apr 6, 2015
…files
Internally, all lines are in an array, with each entry \n terminated.
However, this leads to a problem when the last line in in an included
file lacks a \n, as this gets stored as:
[ "secondlastline\n", "lastline", "#!end included" ]
Which stringifies as:
secondlastline
lastline#!end included
And that lastline doesn't match the files its supposed to.
Closes GH Perl-Toolchain-Gang#14
The internal function
_include_mskip
assumes the included file is \n terminated, and parses it as an array of "\n" terminated values.It then appends a "#end " line to the array, and then later returns it to be joined with
join q[], @list
.However, this means if a file lacking a terminating
\n
will deliver:Which when joined with q[] gives:
Which subsequently parses as
Which of course fails to skip the file called "last-line"
Proposed solution exists in https://github.com/kentfredric/ExtUtils-Manifest/commits/fixes
The text was updated successfully, but these errors were encountered: