Net::DRI::Data::ContactSet(3pm)

Net::DRI::Data::ContactSet3pm

Handle an ordered collection of contacts for net::dri

Overview

This class encapsulates a set of contacts, with associated types. For each type, it can stores as many contacts as needed. Contacts are compared among themselves by calling the id() method on them. Thus all Contact classes must define such a method, which returns a string.

Methods

new()

creates a new object

types()

returns the list of current types stored in this class

has_type()

returns 1 if the given type as first argument has some contacts in this object, 0 otherwise

add()

with the first argument being a contact, and the second (optional) a type, adds the contact to the list of contacts for this type or all types (if no second argument). If the contact already exists (same id()), it will be replaced when found. Returns the object itself.

del()

the opposite of add()

rem()

alias for del()

clear()

removes all contact currently associated to all types

set()

with an array ref as first argument, and a type (optional) as second, set the current list of the given type (or all types) to be the list of contacts in first argument. Returns the object itself.

get()

returns list (in list context) or first element of list (in scalar context) for the type given as argument

get_all()

returns list of contacts, without duplicates, for all types

Support

For now, support questions should be sent to:

<[email protected]>

Please also see the SUPPORT file in the distribution.

Releases

Unchanged in 2 releases since Debian 6.0 (Squeeze).

  1. 6.0–7

Author

Patrick Mevzek, <[email protected]>

From libnet-dri-perl 0.96-1 in Debian 7 (Wheezy). Parsed by carta from the page's man source.