User:AnomieBOT/source/tasks/PERTableUpdater.pm: Difference between revisions

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: General: * Add lots of backslashes to regexes, because new Perl whines about unescaped left-braces.
AnomieBOT (talk | contribs)
Updating published sources: PERTableUpdater: * Fix loading of blacklist from meta. AnomieBOT::API: * Add <code>$api->copy()</code> method.
Line 103:
for my $source (@sources) {
my ($i, $name, $page) = @$source;
my $tb=$api->rawpage($page);
if ( $page=~/^meta:(.+)$/ ) {
$tb=$api->copy( wikibase => 'https://meta.wikimedia.org/w/', assert => 'user' )->rawpage( $1 );
} else {
$tb=$api->rawpage($page);
}
if($tb->{'code'} ne 'success'){
$api->warn("Failed to load $page: ".$tb->{'error'}."\n");