~ubuntu-branches/ubuntu/precise/rakudo/precise

« back to all changes in this revision

Viewing changes to build/gen_core_pm.pl

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghedini
  • Date: 2011-05-17 11:31:09 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110517113109-rmfir654u1axbpt4
Tags: 0.1~2011.04-1
* New upstream release (Closes: #601862, #585762, #577502)
* New maintainer
* Switch to 3.0 (quilt) format
* Update dependencies (Closes: #584498)
* Update debian/copyright to lastest DEP5 revision
* Do not generate/install perl6 manpage (now done by the build system)
* Enable tests
* Bump Standards-Version to 3.9.2 (no changes needed)
* Do not install extra LICENSE files and duplicated docs
* Remove debian/clean (no more needed)
* Add Vcs-* fields in debian/control
* Rewrite (short) description
* Update upstream copyright years
* Upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
# Copyright (C) 2008, The Perl Foundation.
 
3
# $Id$
 
4
 
 
5
use strict;
 
6
use warnings;
 
7
use 5.008;
 
8
 
 
9
binmode STDOUT, ':utf8';
 
10
 
 
11
my @files = @ARGV;
 
12
 
 
13
print <<"END_SETTING";
 
14
# This file automatically generated by $0.
 
15
 
 
16
END_SETTING
 
17
 
 
18
my %classnames;
 
19
foreach my $file (@files) {
 
20
    print "# From $file\n\n";
 
21
    open(my $fh, "<:utf8",  $file) or die "$file: $!";
 
22
    local $/;
 
23
    my $x = <$fh>;
 
24
    close $fh;
 
25
    print $x;
 
26
    foreach ($x =~ /\bclass\s+(\S+)/g) { $classnames{$_}++; }
 
27
}
 
28
 
 
29
print "CHECK {\n";
 
30
foreach (keys(%classnames)) {
 
31
    print "    Perl6::Compiler.import('$_');\n";
 
32
}
 
33
print "}\n";
 
34
 
 
35
print "\n# vim: set ft=perl6 nomodifiable :\n";