NAME

Liz::EmailAddress - module for EmailAddress objects


SYNOPSIS

 use Liz::Forum;
 $forum = new Liz::Forum;
 $email = $forum->EmailAddress;
 $email = $forum->EmailAddress( 'person@domain.com' );
 $email = $forum->EmailAddress( $emailID );

 $email->update;


EXAMPLES


DESCRIPTION


BASIC METHODS


new

Create a new Forum EmailAddress object from a Forum object.

Input Parameters

 1 standard Liz::SQL object
 2 ID or email-address to created EmailAddress object with
Output Parameters

 1 instantiated object
 2 flag: whether tables were just created
Note

It is not intended to call this method directly, but rather indirectly through the Module::EmailAddress module.

Example

 $forum = new Liz::Forum;
 $email = $forum->EmailAddress;
 $email = $forum->EmailAddress( 'liz@xxLINK.nl' );
 $email = $forum->EmailAddress( $emailID );


update

Update a EmailAddress object in the Liz::EmailAddress database.

Output Parameters

 1 ID with which the object was updated (undef = error)
Example

 $email->update;


From

Set or return the From: (name + email address) of the Liz::EmailAddress object. Check field ERROR for errors.

Input Parameters

 1 full email address to set Name and Address to
Output Parameters

 1 current/previous value


CONTENT METHODS

The following methods allow changes to information that is associated with the message object.


Address

Obtain or change the email address associated with the Liz::EmailAddress object. Check method Error to find out whether or not the email address was correctly formatted.

Example

 $address = $email->Address;
 $email->Address( 'liz@xxLINK.nl' );


Other AUTOLOADed content methods

Called when a method is not found. In the Liz::EmailAddress module we assume that if the method does not exist, it is assumed that the method is setting or returning an uppercased key of the object that was available.

Call method allow to specify which keys should be obtained using the Liz::SQL AUTOLOADed methods.

Input Parameters

 1 value to set
   (default: no change)
Output Parameters

 1 old/current value 
Example

 $object->Score( 100 );    # set value of key 'SCORE'
 $score = $object->Score;  # obtain value of key 'SCORE'


Reset

Reset all emailaddress information in the database.

Example

 $address->Reset;
 print "All email addresses have been removed\n";


INTERNAL METHODS

The following methods are intended for internal use only.


ID2Name

Return the name of an ID. Primarily intended for internal use only.

Input Parameters

 1 ID value
 2 table of ID
   (default: look up name of table with ID)
Output Parameters

 1 name of ID
Example

 $name = $object->ID2Name( $ID );


Name2ID

Return the ID of a name in a table. Primarily intended for internal use only.

Input Parameters

 1 name of table of which to obtain ID
 2 string to obtain the ID of
Output Parameters

 1 ID of string
Note

If the name is already escaped and sortname is already set with lowercase characters, then you should use method ``_Name2ID''.

Example

 $ID = $object->Name2ID( 'table','Norway' );


AUTHOR

Elizabeth Mattijsen ( lizperl@INC.nl )


COPYRIGHT

(C) 1998-1999 International Network Consultants


HISTORY

Version 0.33, 30 September 1999

Now no longer add Exporter to ISA: it wasn't necessary.

Version 0.32, 9 July 1999

Changed all CREATE TABLEs to calls to the new Liz::SQL 'create' method. This should again give a significant speed increase in e.g. forums that use this module.

Version 0.31, 23 June 1999

Changed from using method ``Exists'' to ``Count'' in method new to be able to more quickly check for the existence of a table.

Version 0.3, 13 May 1999

Method new now sets global variable $ERROR if obtaining of an existing record failed.

Method new now optionally returns a flag to indicate whether the tables where just created. This to facilitate subclassing and adding extra fields.

Changed typography of source to new indented format.

Version 0.24, 6 October 1998

Now uses fully qualified global variables names to reduce memory footprint.

Version 0.23, 17 September 1998

Method update now returns the ID with which the object was created.

Version 0.22, 30 June 1998

Some more error checking added to method Address.

Version 0.21, 4 June 1998

Fixed problem with method new if an email address was specified instead of an ID. Problem introduced on June 1st.

Version 0.2, 1 June 1998

Updated to new Bulk method.

Version 0.1, 15 May 1998

First version of this true Perl module.