7 print STDERR "Usage: $0 <trusted-CQL-compiler>\n";
10 my $compiler = $ARGV[0];
12 while (<sections/*>) {
15 print "answering section $_ - ", read_file("$sdir/name"), "\n";
20 s@sections/([0-9]+/.*)\.cql@$1@;
21 my $query = read_file($qfile);
23 $afile =~ s/\.cql$/.cxql/;
24 print " query $_ - $query\n";
25 my $fh = new IO::File("| $compiler > $afile")
26 or die "can't run compiler '$compiler': $!";
35 my $fh = new IO::File("<$name")
36 or die "can't read '$name': $!";
37 my $contents = join('', <$fh>);
43 my($name, $contents) = @_;
45 my $fh = new IO::File(">$name")
46 or die "can't create '$name': $!";
47 $fh->print($contents);