Perlwikipedia
view release on metacpan or search on metacpan
RELEASE-NOTES view on Meta::CPAN
* Maxlag parameter: Dafault 5 seconds, can be configured when creating the object
* Delay: 1 second
* Retries: Until success
* Make test 98 fail gracefully on platforms without the test suite
* Fix some really weird spacing in the Makefile.PL
Notes:
* The other maxlag options, along with lots of other defaults, will probably be modifiable in 1.4 with a sort of config sub. This will allow the custom configuration of options for WWW::Mechanize and MediaWiki::API, so you don't need to go sourcedi...
* Since wiki.xyrael.net is down, tests 1, 8, 10, 11
1.3.5 DCOLLINS October 4 2008
Changes made since 1.3.4:
* Allowing cascade protection now. This may or may not work, since there are some changes being made to the protection API.
* Anonymous editing should work. If you still can not use this framework to edit, I need to be contacted. To this end, I've enabled an editing test, hopefully cpan-testers sends me good results :)
* Fix a stupid mistake I made regarding the names of certain parameters to get_history
1.3.4 DCOLLINS September 11 2008
Changes made since 1.3.3:
* Some triage after the first CPAN test results came in:
* Appearantly, get_pages_in_category was running test file 08, test 2, very slowly because I was loading a 1000+ page category in sets of 10 pages at a time. This has been remedied, the limit is now 500.
* Cannot reproduce a bug in get_namespace_names and another in count_contributions - so instead, if we get weird results, we run the sub again.
* There is a bug in get_history which was causing weird errors on some test machines. I've switched it to use MediaWiki::API.
1.3.3 DCOLLINS September 10 2008
Changes made since 1.3.2:
lib/Perlwikipedia.pm view on Meta::CPAN
reason=>$summary };
$hash->{anononly}=$anononly if ($anononly);
$hash->{autoblock}=$autoblock if ($autoblock);
$hash->{nocreate}=$blockac if ($blockac);
$hash->{noemail}=$blockemail if ($blockemail);
$res = $self->{api}->api( $hash );
return $res;
}
=item protect($page, $reason, $editlvl, $movelvl, $time, $cascade)
Protects (or unprotects) the page. $editlvl and $movelvl may be '', 'autoconfirmed', or 'sysop'. $cascade is true/false.
=cut
sub protect {
my $self = shift;
my $page = shift;
my $reason = shift;
my $editlvl = shift || 'all';
my $movelvl = shift || 'all';
my $time = shift || 'infinite';
my $cascade = shift;
if ($cascade and ($editlvl ne 'sysop' or $movelvl ne 'sysop')) {
carp "Can't set cascading unless both editlvl and movelvl are sysop."
}
my $res = $self->{api}->api( {
action=>'query',
titles=>$page,
prop=>'info|revisions',
intoken=>'protect' } );
#use Data::Dumper;print STDERR Dumper($res);
my ($id, $data)=%{$res->{query}->{pages}};
my $edittoken=$data->{protecttoken};
my $hash={ action=>'protect',
title=>$page,
token=>$edittoken,
reason=>$reason,
protections=>"edit=$editlvl|move=$movelvl",
expiry=>$time };
$hash->{'cascade'}=$cascade if ($cascade);
$res = $self->{api}->api( $hash );
return $res;
}
=item get_pages_in_namespace($namespace_id,$page_limit)
Returns an array containing the names of all pages in the specified namespace. The $namespace_id must be a number, not a namespace name. Setting $page_limit is optional. If $page_limit is over 500, it will be rounded up to the next multiple of 500.
=cut
( run in 0.408 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )