User:AnomieBOT/source/AnomieBOT/API/Iterator.pm: Difference between revisions

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: General: * D'oh, of course the node set can be empty in the iterator. * Minor doc fixes. WikiProjectTagger: * Completed.
AnomieBOT (talk | contribs)
Updating published sources: AnomieBOT::API::Iterator: * Possible bugfix, the iterator was probably shifting the input params.
Line 17:
croak "Invalid query: values must be scalars or arrayrefs\n" unless ref($v) eq 'ARRAY';
croak "Invalid query: only one arrayref is allowed\n" if defined($ik);
($ik,$iv)=($k,$v);
$iv=[@$v]; # copy array ref so we don't shift the passed parameter
$query{$ik}=shift(@$iv);
}