This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add another address for Renee Baecker.
[perl5.git] / Porting / checkAUTHORS.pl
index 96d0798..71edbd7 100755 (executable)
@@ -1,6 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
-my ($committer, $patch, $author, $date);
+my ($committer, $patch, $author);
+use utf8;
 use Getopt::Long;
 use Text::Wrap;
 $Text::Wrap::columns = 80;
@@ -11,16 +12,17 @@ my (%authors, %untraced, %patchers, %committers, %real_names);
 
 my $result = GetOptions (
              # modes
-             "who" => \$who,
-             "rank" => \$rank,
+             "who"            => \$who,
+             "rank"           => \$rank,
              "thanks-applied" => \$ta,
-             "missing"   => \$ack ,
-             "tap" => \$tap,
+             "missing"        => \$ack ,
+             "tap"            => \$tap,
+
              # modifiers
-             "authors" => \$author_file,
-             "percentage" => \$percentage,      # show as %age
-             "cumulative" => \$cumulative,
-             "reverse" => \$reverse,
+             "authors=s"      => \$author_file,
+             "percentage"     => \$percentage,      # show as %age
+             "cumulative"     => \$cumulative,
+             "reverse"        => \$reverse,
             );
 
 if (!$result or ( $rank + $ta + $who + $ack + $tap != 1 ) or !@ARGV) {
@@ -28,24 +30,28 @@ if (!$result or ( $rank + $ta + $who + $ack + $tap != 1 ) or !@ARGV) {
 }
 
 $author_file ||= './AUTHORS';
-die "Can't locate '$author_file'. Specify it with '--author <path>'."
+die "Can't locate '$author_file'. Specify it with '--authors <path>'."
   unless -f $author_file;
 
 my $map = generate_known_author_map();
 
 read_authors_files($author_file);
 
-parse_commits_from_stdin();
 
 if ($rank) {
+  parse_commits_from_stdin();
   display_ordered(\%patchers);
 } elsif ($ta) {
+  parse_commits_from_stdin();
   display_ordered(\%committers);
 } elsif ($tap) {
+  parse_commits_from_stdin_authors();
   display_test_output(\%patchers, \%authors, \%real_names);
 } elsif ($ack) {
+  parse_commits_from_stdin();
   display_missing_authors(\%patchers, \%authors, \%real_names);
 } elsif ($who) {
+  parse_commits_from_stdin();
   list_authors(\%patchers, \%authors);
 }
 
@@ -79,9 +85,9 @@ EOS
 sub list_authors {
     my ($patchers, $authors) = @_;
     binmode(STDOUT, ":utf8");
-    print "$_\n" for  sort { lc $a cmp lc $b }
+    print wrap '', '', join(', ', sort { lc $a cmp lc $b }
                       map { $authors->{$_} }
-                      keys %$patchers;
+                      keys %$patchers) . ".\n";
 }
 
 sub parse_commits_from_stdin {
@@ -89,10 +95,10 @@ sub parse_commits_from_stdin {
     for (@lines) {
         next if m/^$/;
         next if m/^(\S*?)^Merge:/ism;    # skip merge commits
-        if (m/^(.*?)^Author:\s*(.*?)^AuthorDate:\s*(.*?)^Commit:\s*(.*?)^(.*)$/gism) {
+        if (m/^(.*?)^Author:\s*(.*?)^AuthorDate:\s*.*?^Commit:\s*(.*?)^(.*)$/gism) {
 
             # new patch
-            ( $patch, $author, $date, $committer ) = ( $1, $2, $3, $4 );
+            ( $patch, $author, $committer ) = ( $1, $2, $3 );
             chomp($author);
             unless ($author) { die $_ }
             chomp($committer);
@@ -105,6 +111,17 @@ sub parse_commits_from_stdin {
 
 }
 
+# just grab authors. Quicker than parse_commits_from_stdin
+
+sub parse_commits_from_stdin_authors {
+    while (<>) {
+        next unless /^Author:\s*(.*)$/;
+       my $author = $1;
+       $author = _raw_address($author);
+       $patchers{$author}++;
+    }
+}
+
 
 sub generate_known_author_map {
     my %map;
@@ -143,6 +160,7 @@ sub generate_known_author_map {
         "arbor\100al37al08.telecel.pt"
         ,    # reported perlbug ticket 5196 - no actual code contribution. no real name - jrv 20091006
         "oracle\100pcr8.pcr.com",    # Reported perlbug ticket 1015 - no patch - Probably Ed Eddington ed@pcr.com
+        "snaury\100gmail.com",       # Reported cpan ticket 35943, with patch for fix
         ;
 
     #
@@ -197,7 +215,7 @@ sub read_authors_files {
     my (%count, %raw);
     foreach my $filename (@authors) {
         open FH, "<$filename" or die "Can't open $filename: $!";
-        binmode FH, ':encoding(ISO-8859-1)';
+        binmode FH, ':encoding(UTF-8)';
         while (<FH>) {
             next if /^\#/;
             next if /^-- /;
@@ -207,7 +225,7 @@ sub read_authors_files {
                 $name =~ s/\s*\z//;
                 $raw{$email} = $name;
                 $count{$email}++;
-            } elsif (/^([-A-Za-z0-9 .\'À-ÖØöø-ÿ]+)[\t\n]/) {
+            } elsif (/^([-A-Za-z0-9 .\'À-ÖØöø-ÿ]+)[\t\n]/) {
 
                 # Name only
                 $untraced{$1}++;
@@ -232,9 +250,9 @@ sub display_test_output {
     my $authors    = shift;
     my $real_names = shift;
     my $count = 0;
+    printf "1..%d\n", scalar keys %$patchers;
     foreach ( sort keys %$patchers ) {
-           $count++;
-
+        $count++;
         if ($authors->{$_}) {
             print "ok $count - ".$real_names->{$_} ." $_\n";
         } else {
@@ -242,7 +260,6 @@ sub display_test_output {
         }
 
     }
-    print "1..$count\n";
 }
 
 sub display_missing_authors {
@@ -314,7 +331,27 @@ sub process {
 sub _raw_address {
     my $addr = shift;
     my $real_name;
-    if ( $addr =~ /<.*>/ ) {
+    if ($addr =~ /(?:\\?")?\s*\(via RT\) <perlbug-followup\@perl\.org>$/p) {
+        my $name = ${^PREMATCH};
+        $addr = 'perlbug-followup@perl.org';
+        #
+        # Try to find the author
+        #
+        if (exists $map->{$name}) {
+            $addr = $map->{$name};
+            $real_name = $authors{$addr};
+        }
+        else {
+            while (my ($email, $author_name) = each %authors) {
+                if ($name eq $author_name) {
+                    $addr = $email;
+                    $real_name = $name;
+                    last;
+                }
+            }
+        }
+    }
+    elsif ( $addr =~ /<.*>/ ) {
         $addr =~ s/^\s*(.*)\s*<\s*(.*?)\s*>.*$/$2/;
         $real_name = $1;
     }
@@ -372,6 +409,7 @@ davem                                   davem\100fdgroup.com
 demerphq                                demerphq\100gmail.com
 +                                       yves.orton\100de.mci.com
 +                                       yves.orton\100mciworldcom.de
++                                       yves.orton\100booking.com
 +                                       demerphq\100dromedary.booking.com
 +                                       demerphq\100gemini.(none)
 +                                       demerphq\100camel.booking.com
@@ -435,6 +473,16 @@ rgs                                     rgarciasuarez\100free.fr
 sky                                     sky\100nanisky.com
 +                                       artur\100contiller.se
 +                                       arthur\100contiller.se
+smueller                                7k8lrvf02\100sneakemail.com
++                                       kjx9zthh3001\100sneakemail.com
++                                       dtr8sin02\100sneakemail.com
++                                       rt8363b02\100sneakemail.com
++                                       o6hhmk002\100sneakemail.com
++                                       smueller\100cpan.org
++                                       l2ot9pa02\100sneakemail.com
++                                       wyp3rlx02\100sneakemail.com
++                                       0mgwtfbbq\100sneakemail.com
++                                       xyey9001\100sneakemail.com
 steveh                                  steve.m.hay\100googlemail.com
 +                                       stevehay\100planit.com
 +                                       steve.hay\100uk.radan.com
@@ -450,16 +498,8 @@ tonyc                                   tony\100develop-help.com
 # Mere mortals.
 #
 \043####\100juerd.nl                    juerd\100cpan.org
++                                       juerd\100c3.convolution.nl
 +                                       juerd\100convolution.nl
-7k8lrvf02\100sneakemail.com             kjx9zthh3001\100sneakemail.com
-+                                       dtr8sin02\100sneakemail.com
-+                                       rt8363b02\100sneakemail.com
-+                                       o6hhmk002\100sneakemail.com
-+                                       smueller\100cpan.org
-+                                       l2ot9pa02\100sneakemail.com
-+                                       wyp3rlx02\100sneakemail.com
-+                                       0mgwtfbbq\100sneakemail.com
-+                                       xyey9001\100sneakemail.com
 a.r.ferreira\100gmail.com               aferreira\100shopzilla.com
 abe\100ztreet.demon.nl                  abeltje\100cpan.org
 abela\100hsc.fr                         abela\100geneanet.org
@@ -495,6 +535,7 @@ andreas.koenig\100anima.de              andreas.koenig.gmwojprw\100franz.ak.mind
 +                                       root\100dubravka.in-berlin.de
 anno4000\100lublin.zrz.tu-berlin.de     anno4000\100mailbox.tu-berlin.de
 +                                       siegel\100zrz.tu-berlin.de
+apocal@cpan.org                         perl\1000ne.us
 arnold\100gnu.ai.mit.edu                arnold\100emoryu2.arpa
 +                                       gatech!skeeve!arnold
 arodland\100cpan.org                    andrew\100hbslabs.com
@@ -517,10 +558,14 @@ bepi\100perl.it                         enrico.sorcinelli\100gmail.com
 bert\100alum.mit.edu                    bert\100genscan.com
 bigbang7\100gmail.com                   ddascalescu+github\100gmail.com
 blgl\100stacken.kth.se                  blgl\100hagernas.com
++                                       2bfjdsla52kztwejndzdstsxl9athp\100gmail.com
 brian.d.foy\100gmail.com                bdfoy\100cpan.org
 BQW10602\100nifty.com                   sadahiro\100cpan.org
+bulk88\100hotmail.com                   bulk88
 
 chromatic\100wgz.org                    chromatic\100rmci.net
+ckuskie\100cadence.com                  colink\100perldreamer.com
+claes\100surfar.nu                      claes\100versed.se
 clintp\100geeksalad.org                 cpierce1\100ford.com
 clkao\100clkao.org                      clkao\100bestpractical.com
 corion\100corion.net                    corion\100cpan.org
@@ -545,6 +590,8 @@ david.dyck\100fluke.com                 dcd\100tc.fluke.com
 david\100kineticode.com                 david\100wheeler.com
 +                                       david\100wheeler.net
 dennis\100booking.com                   dennis\100camel.ams6.corp.booking.com
++                                      dennis.kaarsemaker\100booking.com
++                                       dennis\100kaarsemaker.net
 dev-perl\100pimb.org                    knew-p5p\100pimb.org
 +                                       lists-p5p\100pimb.org
 djberg86\100attbi.com                   djberg96\100attbi.com
@@ -583,6 +630,7 @@ hansmu\100xs4all.nl                     hansm\100icgroup.nl
 hio\100ymir.co.jp                       hio\100hio.jp
 hops\100sco.com                         hops\100scoot.pdev.sco.com
 
+ian.goodacre\100xtra.co.nz              ian\100debian.lan
 ingo_weinhold\100gmx.de                 bonefish\100cs.tu-berlin.de
 
 james\100mastros.biz                    theorb\100desert-island.me.uk
@@ -597,7 +645,6 @@ jasons\100cs.unm.edu                    jasons\100sandy-home.arc.unm.edu
 jbuehler\100hekimian.com                jhpb\100hekimian.com
 jcromie\100100divsol.com                jcromie\100cpan.org
 +                                       jim.cromie\100gmail.com
-jidanni\100jidanni.org                  jidanni\100hoffa.dreamhost.com
 jdhedden\100cpan.org                    jerry\100hedden.us
 +                                       jdhedden\1001979.usna.com
 +                                       jdhedden\100gmail.com
@@ -607,7 +654,9 @@ jeremy\100zawodny.com                   jzawodn\100wcnet.org
 jesse\100sig.bsh.com                    jesse\100ginger
 jfriedl\100yahoo.com                    jfriedl\100yahoo-inc.com
 jfs\100fluent.com                       jfs\100jfs.fluent.com
-jhannah\100omnihotels.com               jay\100jays.net
+jhannah\100mutationgrid.com             jay\100jays.net
++                                       jhannah\100omnihotels.com
+jidanni\100jidanni.org                  jidanni\100hoffa.dreamhost.com
 jjore\100cpan.org                       twists\100gmail.com
 jns\100integration-house.com            jns\100gellyfish.com
 +                                       gellyfish\100gellyfish.com
@@ -616,10 +665,12 @@ john\100johnwright.org                  john.wright\100hp.com
 joseph\100cscaper.com                   joseph\1005sigma.com
 joshua\100rodd.us                       jrodd\100pbs.org
 jtobey\100john-edwin-tobey.org          jtobey\100user1.channel1.com
-jpeacock\100rowman.com                  john.peacock\100havurah-software.org
+jpeacock\100messagesystems.com          john.peacock\100havurah-software.org
 +                                       jpeacock\100havurah-software.org
 +                                       jpeacock\100dsl092-147-156.wdc1.dsl.speakeasy.net
 +                                       jpeacock\100jpeacock-hp.doesntexist.org
++                                       jpeacock\100cpan.org
++                                       jpeacock\100rowman.com
 jql\100accessone.com                    jql\100jql.accessone.com
 jsm28\100hermes.cam.ac.uk               jsm28\100cam.ac.uk
 
@@ -628,9 +679,12 @@ kane\100dwim.org                        kane\100xs4all.net
 +                                       kane\100xs4all.nl
 +                                       jos\100dwim.org
 +                                       jib\100ripe.net
+keith.s.thompson\100gmail.com           kst\100mib.org
 ken\100mathforum.org                    kenahoo\100gmail.com
 +                                       ken.williams\100thomsonreuters.com
 kroepke\100dolphin-services.de          kay\100dolphin-services.de
+kst\100mib.org                          kst\100cts.com
++                                       kst\100SDSC.EDU
 kstar\100wolfetech.com                  kstar\100cpan.org
 +                                       kurt_starsinic\100ml.com
 +                                       kstar\100www.chapin.edu
@@ -651,6 +705,8 @@ lupe\100lupe-christoph.de               lupe\100alanya.m.isar.de
 lutherh\100stratcom.com                 lutherh\100infinet.com
 mab\100wdl.loral.com                    markb\100rdcf.sm.unisys.com
 marcel\100codewerk.com                  gr\100univie.ac.at
+marcgreen\100cpan.org                   marcgreen\100wpi.edu
+markleightonfisher\100gmail.com         fisherm\100tce.com
 mark.p.lutz\100boeing.com               tecmpl1\100triton.ca.boeing.com
 marnix\100gmail.com                     pttesac!marnix!vanam
 marty+p5p\100kasei.com                  marty\100martian.org
@@ -661,6 +717,7 @@ me\100davidglasser.net                  glasser\100tang-eleven-seventy-nine.mit.
 merijnb\100iloquent.nl                  merijnb\100ms.com
 +                                       merijnb\100iloquent.com
 merlyn\100stonehenge.com                merlyn\100gadget.cscaper.com
+mestre.smash\100gmail.com               smash\100cpan.org
 mgjv\100comdyn.com.au                   mgjv\100tradingpost.com.au
 mlh\100swl.msd.ray.com                  webtools\100uewrhp03.msd.ray.com
 michael.schroeder\100informatik.uni-erlangen.de mls\100suse.de
@@ -693,6 +750,10 @@ ilya\100martynov.org                    ilya\100juil.nonet
 
 joshua.pritikin\100db.com               joshua\100paloalto.com
 
+litt\100acm.org                         tlhackque\100yahoo.com
+
+meyering@asic.sc.ti.com                 jim\100meyering.net
+
 okamoto\100corp.hp.com                  okamoto\100hpcc123.corp.hp.com
 orwant\100oreilly.com                   orwant\100media.mit.edu
 
@@ -735,10 +796,13 @@ public\100khwilliamson.com              khw\100karl.(none)
 +                                       khw\100khw-desktop.(none)
 
 radu\100netsoft.ro                      rgreab\100fx.ro
+rajagopa\100pauline.schrodinger.com     rajagopa\100schrodinger.com
 raphael.manfredi\100pobox.com           raphael_manfredi\100grenoble.hp.com
 module@renee-baecker.de                 renee.baecker\100smart-websolutions.de
 +                                       reneeb\100reneeb-desktop.(none)
++                                       github@renee-baecker.de
 +                                       otrs\100ubuntu.(none)
++                                       perl\100renee-baecker.de
 richard.foley\100rfi.net                richard.foley\100t-online.de
 +                                       richard.foley\100ubs.com
 +                                       richard.foley\100ubsw.com
@@ -750,6 +814,7 @@ rjbs\100cpan.org                        rjbs-perl-p5p\100lists.manxome.org
 +                                       perl.p5p\100rjbs.manxome.org
 rjk\100linguist.dartmouth.edu           rjk\100linguist.thayer.dartmouth.edu
 +                                       rjk-perl-p5p\100tamias.net
++                                       rjk\100tamias.net
 rjray\100redhat.com                     rjray\100uswest.com
 rmgiroux\100acm.org                     rmgiroux\100hotmail.com
 +                                       mgiroux\100bear.com
@@ -758,18 +823,24 @@ rmbarker\100cpan.org                    rmb1\100cise.npl.co.uk
 +                                       rmb\100cise.npl.co.uk
 +                                       robin\100spade-ubuntu.(none)
 +                                       r.m.barker\100btinternet.com
++                                       rmbarker.cpan\100btinternet.com
 robertmay\100cpan.org                   rob\100themayfamily.me.uk
 roberto\100keltia.freenix.fr            roberto\100eurocontrol.fr
 robin\100cpan.org                       robin\100kitsite.com
 roderick\100argon.org                   roderick\100gate.net
 +                                       roderick\100ibcinc.com
+root\100ub32.org                        argrath\100ub32.org
 rootbeer\100teleport.com                rootbeer\100redcat.com
 +                                       tomphoenix\100unknown
 rurban\100x-ray.at                      rurban\100cpan.org
-
++                                       rurban\100cpanel.net
+sartak\100bestpractical.com             sartak\100gmail.com
++                                       code\100sartak.org
+sadinoff\100olf.com                     danny-cpan\100sadinoff.com
 schubiger\100cpan.org                   steven\100accognoscere.org
 +                                       sts\100accognoscere.org
 +                                       schubiger\100gmail.com
++                                       stsc\100refcnt.org
 schwern\100pobox.com                    schwern\100gmail.com
 +                                       schwern\100athens.arena-i.com
 +                                       schwern\100blackrider.aocn.com
@@ -780,7 +851,11 @@ schwab\100suse.de                       schwab\100issan.informatik.uni-dortmund.
 +                                       schwab\100ls5.informatik.uni-dortmund.de
 sebastien\100aperghis.net               maddingue\100free.fr
 +                                       saper\100cpan.org
-shlomif\100vipe.technion.ac.il          shlomif\100iglu.org.il
+shigeya\100wide.ad.jp                   shigeya\100foretune.co.jp
+shlomif\100cpan.org                     shlomif\100vipe.technion.ac.il
++                                       shlomif\100iglu.org.il
++                                       shlomif+processed-by-perl\100gmail.com
++                                       shlomif\100shlomifish.org
 simon\100simon-cozens.org               simon\100pembro4.pmb.ox.ac.uk
 +                                       simon\100brecon.co.uk
 +                                       simon\100othersideofthe.earth.li
@@ -803,6 +878,7 @@ spider\100orb.nashua.nh.us              spider\100web.zk3.dec.com
 +                                       spidb\100cpan.org
 +                                       spider.boardman\100orb.nashua.nh.us
 +                                       root\100peano.zk3.dec.com
+spiros\100lokku.com                    s.denaxas\100gmail.com
 spp\100ds.net                           spp\100psa.pencom.com
 +                                       spp\100psasolar.colltech.com
 +                                       spp\100spotter.yi.org
@@ -811,6 +887,7 @@ stef\100mongueurs.net                   stef\100payrard.net
 +                                       properler\100freesurf.fr
 +                                       stef\100francenet.fr
 sthoenna\100efn.org                     ysth\100raven.shiftboard.com
+sisyphus1\100optusnet.com.au            sisyphus\100cpan.org
 
 tassilo.parseval\100post.rwth-aachen.de tassilo.von.parseval\100rwth-aachen.de
 tchrist\100perl.com                     tchrist\100mox.perl.com
@@ -835,4 +912,7 @@ whatever\100davidnicol.com              davidnicol\100gmail.com
 wolfgang.laun\100alcatel.at             wolfgang.laun\100chello.at
 +                                       wolfgang.laun\100thalesgroup.com
 +                                       wolfgang.laun\100gmail.com
+wolfsage\100gmail.com                   mhorsfall\100darmstadtium.(none)
 yath\100yath.de                         yath-perlbug\100yath.de
+
+jkeen@verizon.net                       jkeenan@cpan.org