NAME

Liz::Survey::Answer - module for Answer objects of the Survey


SYNOPSIS

 use Liz::Survey;
 $survey = new Liz::Survey;

 $answer = $survey->Answer;
 $answer = $survey->Answer( $answerID );

 $answer->update;


EXAMPLES


DESCRIPTION

Provide object oriented access to answers in a Survey. Usually not accessed directly, but rather through the Liz::Survey object and its Answer method.


BASIC METHODS


new

Create a new Answer object from a Survey object.

Input Parameters

 1 Liz::Survey object
 2 ID to created Answer object with
   (default: none = new answer)
Output Parameters

 1 instantiated object
Note

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

Example

 $survey = new Liz::Survey;
 $answer = $survey->Answer;
 $answer = $survey->Answer( $answerID );


update

Update a Answer object in the Liz::Survey database.

Output Parameters

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

 $answerID = $answer->update;


delete

Delete a Liz::Survey::Answer object from the database.

Output Parameters

 1 flag: whether action was successful
Example

 $answer->delete;


CONTENT METHODS

The following methods allow you to inspect and/or change certain fields of the Liz::Survey::Answer object.


ChosenTextIDs

Return the textIDs of the selected choices.

Output Parameters

 1..N the textIDs of the selected choices
Example

 foreach ($answer->ChosenTextIDs) {
  print "$_\n";
 }

#INHERITED FROM Liz::Survey

#-----------------------------------------------------------

ChosenTexts

Return the texts of the selected choices.

Output Parameters

 1..N the texts of the selected choices
Example

 foreach ($answer->ChosenTexts) {
  print "$_\n";
 }

#INHERITED FROM Liz::Survey #-----------------------------------------------------------

Created

Return the Created timestamp of the Liz::Survey::Answer object.

Output Parameters

 1 current timestamp value of the Created date
Example

 $created = $answer->Created;

Email

Set or return the email address of the Liz::Survey::Answer object.

Input Parameters

 1 new email address of the object
   (default: no change)
Output Parameters

 1 current email address of the object
Example

 $answer->Email( $email );
 $email = $answer->Email;

ID

Return the ID of the Liz::Survey::Answer object.

Output Parameters

 1 current ID of the object
Example

 $ID = $answer->ID;

IP

Set or return the IP-number of the Liz::Survey::Answer object.

Input Parameters

 1 new IP-number of the object
   (default: no change)
Output Parameters

 1 current IP-number of the object
Example

 $answer->IP( $ENV{'REMOTE_ADDR'} );
 $IP = $answer->IP;

Session

Set or return the session key of the Liz::Survey::Answer object.

Input Parameters

 1 new session key of the object
   (default: no change)
Output Parameters

 1 current session key of the object
Example

 $answer->Session( $ENV{'AUTOMATICSESSIONCOOKIE'} );
 $session = $answer->Session;

Status

Set or return the status of the Liz::Survey::Answer object.

Input Parameters

 1 new status of the object
   (default: no change)
Output Parameters

 1 current status of the object
Example

 $answer->Status( 1 );
 $status = $answer->Status;

Updated

Return the Updated timestamp of the Liz::Survey::Answer object.

Output Parameters

 1 current timestamp value of the Updated date
Example

 $updated = $answer->Updated;

Visitor

Set or return the visitor key of the Liz::Survey::Answer object.

Input Parameters

 1 new visitor key of the object
   (default: no change)
Output Parameters

 1 current visitor key of the object
Example

 $answer->Visitor( $ENV{'VISITORID'} );
 $visitor = $answer->Visitor;

AUTHOR

Elizabeth Mattijsen ( lizperl@INC.nl )

COPYRIGHT

(C) 1999 International Network Consultants

HISTORY

Version 0.21, 30 September 1999

Now no longer puts Exporter in ISA: it was not needed.

Version 0.2, 28 September 1999

Method new now properly sets the SURVEY field.

Version 0.1, 21 September 1999

First version of this true Perl module.