my @branches = map { m!table-([^/]+).html$! && $1 } reverse sort glob("$dir/table-*.html");
-my ($b, $title);
-
-foreach $b (@branches) {
+foreach my $b (@branches) {
+ my $title;
($title = $b) =~ tr/-/ /;
print "<li><a href='#t${b}-branch'>$title</a> — $branch_status{$b}</li>\n";
}
-->
_EOF_
-foreach $b (@branches) {
+foreach my $b (@branches) {
+ my $title;
($title = $b) =~ tr/-/ /;
print "<h2><a name='t${b}-branch'></a>", ucfirst($title), "</h2>\n";
- open F, "$dir/table-${b}.html" or die $!;
- print foreach <F>;
- close F;
+ open my $f, '<', "$dir/table-${b}.html" or die $!;
+ print foreach <$f>;
+ close $f;
print "<p><a href='qualified-list-$b.txt'>qualified list</a></p>\n" if -e "$dir/qualified-list-$b.txt";
}
-#! /usr/bin/perl -w
+#! /usr/bin/perl
# Prerequisites:
# Input files given as argument (e.g., *.po)
# set URL with -U option
use strict;
+use warnings;
use File::Basename;
use Getopt::Std;
my %opts;
getopts('U:l:', \%opts) or die;
my $po_url = $opts{'U'} || 'po';
-my $list_file = $opts{'l'};
-open LIST, '>', $opts{'l'} if $list_file;
+my $list_filename = $opts{'l'};
+open my $list_fh, '>', $opts{'l'} if $list_filename;
my $everything;
my $errors;
}
print "</td>\n";
- print LIST "$catalog/$lang\n" if $list_file and defined $pct and $pct >= $QUALIFIED_CUTOFF;
+ print $list_fh "$catalog/$lang\n" if $list_filename and defined $pct and $pct >= $QUALIFIED_CUTOFF;
}
print "<td align=\"center\">";
print "</table>\n";
print "</div>\n";
-close LIST if $list_file;
+close $list_fh if $list_filename;
sub list_sum {
my $total;
-#! /usr/bin/perl -w
+#! /usr/bin/perl
# Prerequisites:
# GNU make (envar GMAKE)
# Produces various output on stderr
use strict;
+use warnings;
use Getopt::Std;
use File::Basename;
foreach (@ARGV) {
my $dirname = dirname($_);
- open NLSMK, "<$_" or die "could not open $_: $!\n";
+ open my $nlsmk, '<', $_ or die "could not open $_: $!\n";
my $catalogname;
- my $lang;
- while (<NLSMK>) {
+ while (<$nlsmk>) {
/^CATALOG_NAME\s*:?=\s*(\S+)\s*$/ and $catalogname = $1;
}
- close NLSMK;
+ close $nlsmk;
system("$gmake -C $dirname init-po") == 0 or die "$!\n";
system("cp -f $dirname/po/$catalogname.pot $outdir/$catalogname.pot") == 0 or die "$!\n";
my $avail_languages = join(' ', map { m!/([^/]+)\.po$! && $1 } glob("$dirname/po/*.po"));
print STDERR "* $catalogname\n";
- foreach $lang (@all_languages) {
+ foreach my $lang (@all_languages) {
print STDERR "$lang: ";
system("rm -f $outdir/$catalogname-$lang.po.err");