Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 32 lines (25 sloc) 0.598 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
#!/usr/bin/perl
# Copyright (C) 2008, The Perl Foundation.
# $Id$

use strict;
use warnings;

my @files = @ARGV;

print <<"END_SETTING";
# This file automatically generated by $0.

END_SETTING

my %classnames;
foreach my $file (@files) {
    print "# From $file\n\n";
    open(my $fh, "<", $file) or die $!;
    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";
Something went wrong with that request. Please try again.