NAME
CWB::CQP::More::Iterator - Iterator for CWB::CQP resultsets
SYNOPSIS
use CWB::CQP::More;
my $cwb = CWB::CQP::More->new();
$cwb->change_corpus("foo");
$cwb->exec('A = "dog";');
my $iterator = $cwb->iterator("A");
my $next_line = $iterator->next;
my $iterator20 = $cwb->iterator("A", size => 20);
my @twenty = $iterator20->next;
my $iteratorFoo = $cwb->iterator("A", size => 20, corpus => 'foo');
my @lines = $iteratorFoo->next;
$iterator->reset;
$iterator->increment(20);
DESCRIPTION
This module implements an interator for CWB result sets. Please to not use the constructor directly. Instead, use the iterator
method on CWB::CQP::More
module.
new
Creates a new iterator. Used internally by the CWB::CQP::More
module, when the method iterator
is called.
next
Returns the next line(s) on the result set.
reset
Restarts the iterator.
increment
Without arguments returns the current iterator increment size (number of lines returned by iteraction). With an argument, changes the size of the increment. The increment size can be changed while using the iterator.
SEE ALSO
CWB::CQP::More (3), perl(1)
AUTHOR
Alberto Manuel Brandão Simões, <ambs@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2010 by Alberto Manuel Brandão Simões