Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 35717e4d7ed7563f2f8cfb002e255b7999bf2981
      
https://github.com/Perl/perl5/commit/35717e4d7ed7563f2f8cfb002e255b7999bf2981
  Author: Lukas Mai <[email protected]>
  Date:   2024-08-15 (Thu, 15 Aug 2024)

  Changed paths:
    M Porting/sync-with-cpan

  Log Message:
  -----------
  Porting/sync-with-cpan: remove outdated TODO

sync-with-cpan has been updating `Porting/Maintainers.pl` for well over
a decade now (starting with 9807c17b8e7ba), so remove its TODO item.


  Commit: 61a65f6ebede0cb107b3be24533370e4b1a9c5de
      
https://github.com/Perl/perl5/commit/61a65f6ebede0cb107b3be24533370e4b1a9c5de
  Author: Lukas Mai <[email protected]>
  Date:   2024-08-15 (Thu, 15 Aug 2024)

  Changed paths:
    M Porting/Maintainers.pl
    M Porting/sync-with-cpan

  Log Message:
  -----------
  Porting/sync-with-cpan: fix SYNCINFO update logic

The intent of the code was to update the `'SYNCINFO' => '...'` line if
it was already there, and add it if not. However, the regex that checked
for the presence of SYNCINFO didn't handle leading spaces: It only
checked for `'SYNCINFO'` at the beginning of the line. Since all
SYNCINFO entries were added with leading spaces (properly indented),
this never matched and new SYNCINFO lines were added each time.

Furthermore, since the new SYNCINFO lines were added early, the latest
SYNCINFO was always at the top. The generated code is part of a hash
initializer, so the last (oldest) entry would always "win", overwriting
the newer SYNCINFO at runtime. In practice this means once a module had
a SYNCINFO key in `Porting/Maintainers.pl`, consumers of this data would
never see any updates to SYNCINFO.

There was another issue: If a `'SYNCINFO' =>` line was present, but the
rest of the line couldn't be parsed, the code simply wouldn't do
anything, neither updating nor adding any SYNCINFO entries.

This commit modifies the regex to allow leading whitespace when checking
for SYNCINFO lines. It also performs the test and update in a single
s/// instead of reparsing bits and pieces. Finally, it removes old
accumulated SYNCINFO entries from `Porting/Maintainers.pl`.


Compare: https://github.com/Perl/perl5/compare/b36021942813...61a65f6ebede

To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to