This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
1. Add Unicode UCD version; 2. sort *unique*; 3. remove win32/ext
authorH.Merijn Brand <h.m.brand@xs4all.nl>
Wed, 9 May 2007 14:17:57 +0000 (14:17 +0000)
committerH.Merijn Brand <h.m.brand@xs4all.nl>
Wed, 9 May 2007 14:17:57 +0000 (14:17 +0000)
p4raw-id: //depot/perl@31176

Porting/corelist.pl

index f79cc15..d2a2913 100644 (file)
@@ -7,7 +7,7 @@ use warnings;
 use File::Find;
 use ExtUtils::MM_Unix;
 
-my @lines;
+my %lines;
 find(sub {
     /(\.pm|_pm\.PL)$/ or return;
     /PPPort\.pm$/ and return;
@@ -33,8 +33,14 @@ find(sub {
            );
     $module =~ s{/}{::}g;
     $module =~ s/(\.pm|_pm\.PL)$//;
-    push @lines, sprintf "\t%-24s=> $version,\n", "'$module'";
-}, 'lib', 'ext', 'win32/ext', 'vms/ext', 'symbian/ext');
+    $lines{sprintf "\t%-24s=> $version,\n", "'$module'"}++;
+}, 'lib', 'ext', 'vms/ext', 'symbian/ext');
+
+if (open my $ucdv, "<", "lib/unicore/version") {
+    chomp (my $ucd = <$ucdv>);
+    $lines{sprintf "\t%-24s=> '$ucd',\n", "'Unicode'"}++;
+    close $ucdv;
+    }
 print "    $] => {\n";
-print sort @lines;
+print sort keys %lines;
 print "    },\n";