User:ImplSearchBot/Code: Difference between revisions

m
ImplSearchBot:0
m (ImplSearchBot:0)
m (ImplSearchBot:0)
Line 17:
my $cacheonly; # Don't query the wiki for data. Just pull from cache.
my $nosvn;
my $rebuild_all;
 
my $opt_matrix = {
Line 26 ⟶ 27:
"cacheonly" => \$cacheonly,
"nosvn" => \$nosvn,
"cachepath=s" => \$cachepath };,
"rebuildall" => \$rebuild_all };
 
my $result = GetOptions( %$opt_matrix );
Line 52 ⟶ 54:
$options{'cacheonly'} = $cacheonly
if defined $cacheonly;
 
$options{'rebuild_all'} = $rebuild_all
if defined $rebuild_all;
 
Line 111 ⟶ 116:
# of the pages. :-/
my $task_count_change;
unless(exists $options{'rebuild_all'})
{
my $cacheddata = &getcacheddata('Category:Programming Tasks');
my ($added, $removed) = &diffcat($alltasks, $cacheddata);
$task_count_change = scalar @$added + scalar @$removed;
}
else
{
$task_count_change = 1; # It just needs to be nonzero...
}