1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
#!/usr/bin/perl -w
=head1 NAME
Debconf::Iterator - DebConf iterator object
=cut
package Debconf::Iterator;
use strict;
use base qw(Debconf::Base);
=head1 DESCRIPTION
This is an iterator object, for use by the DbDriver mainly. Use this object
just as you would use anything else derived from Debconf::Base.
=head1 FIELDS
Generally any you want. By convention prefix any field names you use with
your module's name, to prevent conflicts when multiple modules need to use
the same iterator.
=over 4
=item callback
A subroutine reference, this subroutine will be called each time the
iterator iterates, and should return the next item in the sequence or
undef.
=back
=head1 METHODS
=item iterate
Iterate to and return the next item, or undef when done.
=cut
sub iterate {
my $this=shift;
$this->callback->($this);
}
=head1 AUTHOR
Joey Hess <joeyh@debian.org>
=cut
1
|