Skip to content

Commit

Permalink
Simplify gen_core_pm.pl, then just rename it to indicate it's a gener…
Browse files Browse the repository at this point in the history
…ic way to merge multiple .pm files into one.
  • Loading branch information
jnthn committed May 4, 2011
1 parent d58f6a3 commit a04f6bf
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions build/gen_core_pm.pl → build/merge_pm.pl
@@ -1,5 +1,5 @@
#!/usr/bin/perl
# Copyright (C) 2008, The Perl Foundation.
# Copyright (C) 2008-2011, The Perl Foundation.
# $Id$

use strict;
Expand All @@ -15,21 +15,13 @@

END_SETTING

my %classnames;
foreach my $file (@files) {
print "# From $file\n\n";
open(my $fh, "<:utf8", $file) or die "$file: $!";
local $/;
my $x = <$fh>;
close $fh;
print $x;
foreach ($x =~ /\bclass\s+(\S+)/g) { $classnames{$_}++; }
}

print "CHECK {\n";
foreach (keys(%classnames)) {
print " Perl6::Compiler.import('$_');\n";
}
print "}\n";

print "\n# vim: set ft=perl6 nomodifiable :\n";

0 comments on commit a04f6bf

Please sign in to comment.