---------------------------------------- > Date: Thu, 10 Oct 2013 21:31:41 +0200 > Subject: Re: Perl's Win32::API on MSYS > From: sschube...@gmail.com > To: bul...@hotmail.com > CC: d...@perl.it; libwin32@perl.org > > > I was hoping to make clear in the commit message that it actualy *is* > a bug fix. The original code has > > length($dlib)-$pos+length('CCFLAGS = ') > > which should actually be > > length($dlib)-($pos+length('CCFLAGS = ')) > > Note the parenthesis. In the same run I've simplified the code a bit > to not recalculate $pos+length('CCFLAGS = ') multiple times. >
You should've just said the 3rd param to substr was overflowing/larger than the size of the 2nd half of string being returned by the substr. What confused me was there was no visible side effects of this bug, since substr will return upto the end of the string, not pad it out, if you request more bytes than there are left in the string. > > As it's an unrelated bug fix I'd like to keep it as a separate commit. > And also to maintain my authorship. Feel free to cherry-pick the > commit. If it's of any help to you I can also create the same pull > request for your fork. Cherry picked. You're in the git log. > > Why squash the commits? Strictly spoken they are unrelated, because > the one is about old MakeMaker versions (not necessarily from MSYS), > and the other one for MSYS / old Perl compatibility. But it's of > course up to you. > I like fatter commits rather than smaller. It makes the git history easier to understand and git being more responsive. > > I'd require a CPAN release. Maybe you could do something like a 0.75.1 > release which just adds MSYS support? > http://search.cpan.org/~bulkdd/Win32-API-0.76_04/