This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
checkAUTHORS.pl - allow the script to be used as a module.
[perl5.git] / Porting / perlgov-team-update
1 #!/usr/bin/env perl
2 use v5.30.0;
3 use warnings;
4 use Encode qw(encode);
5 use JSON::PP;
6
7 my $file = 'Porting/core-team.json';
8 open my $fh, '<:encoding(UTF-8)', $file
9   or die "can't read $file: $!\n";
10
11 my $json = do { local $/; <$fh> };
12
13 my $data = JSON::PP->new->decode($json);
14
15 my $pod = q{};
16
17 for my $key (qw( active inactive )) {
18   $pod .= qq{=head2 \u$key Members\n\n=over 4\n\n};
19
20   my @items = map {; encode('utf-8', "<$_>") } $data->{$key}->@*;
21
22   open(my $fh, '-|', 'git', 'check-mailmap', @items)
23     or die "error running check-mailmap: $!";
24
25   my @lines = <$fh>;
26
27   $pod .= "=item $_\n" for sort @lines;
28
29   $pod .= "=back\n\n";
30 }
31
32 say $pod;