Skip to Content.
Sympa Menu

Documentation for Sympa

NAME

Sympa::DataSource - Base class of Sympa data source subclasses

SYNOPSIS

# To implemnt Sympa::DataSource::Foo:

package Sympa::DataSource::Foo;

use base qw(Sympa::DataSource);

sub _open {
    my $self = shift;
    ...
    return $handle;
}

sub _next {
    my $self = shift;
    ...
    return [$email, $gecos];
}

1;

# To use Sympa::DataSource::Foo:

usr Sympa::DataSource;

$ds = Sympa::DataSource->new('Foo', 'member', context => $list,
    key => val, ...);
if ($ds and $ds->open) {
    while (my $member = $ds->next) {
        ...
    }
    $ds->close;
}

DESCRIPTION

TBD.

Methods

Methods subclass should implement

Attributes

HISTORY

Sympa::DataSource appeared on Sympa 6.2.45b. See also “HISTORY” in Sympa::Request::Handler::include.

Top of Page