my %xinfo;
for my $xfile (@xfile) {
print "Loading $xfile\n";
- my $info = &parse_sql($xfile);
+ my $info = parse_sql($xfile);
for (keys %$info) {
$xinfo{$_} = $info->{$_};
}
for my $oldfile (@old) {
print "Loading $oldfile\n";
- my $info = &parse_sql($oldfile);
+ my $info = parse_sql($oldfile);
for (keys %xinfo) {
$info->{$_} = $xinfo{$_};
}
$table = $1;
$info{$table}{name}=$table;
}
- elsif (m#^\) /\*\$wgDBTableOptions\*/#) {
+ elsif (m{^\) /\*\$wgDBTableOptions\*/}) {
$info{$table}{engine} = 'TYPE';
$info{$table}{type} = 'variable';
}
}
}
- close $oldfh;
+ close $oldfh or die qq{Could not close "$oldfile": $!\n};
return \%info;
}
next;
}
- $ptable{$1}=2 while /'(\w+)'/g;
+ $ptable{$1}=2 while m{'(\w+)'}g;
last if /\);/;
}
-close $pfh;
+close $pfh or die qq{Could not close "$parsefile": $!\n};
my $OK_NOT_IN_PTABLE = '
filearchive
## Check for some common errors in the files in the includes directory
print "Checking files in includes directory...\n";
- my $dir = "../../includes";
+ my $dir = '../../includes';
opendir my $dh, $dir or die qq{Could not opendir $dir: $!\n};
for my $file (grep { -f "$dir/$_" and /\.php$/ } readdir $dh) {
$file = "$dir/$file";
}
closedir $dh or die qq{Closedir failed?!\n};
-
-
+ return;
} ## end of check_includes_dir