NAME

Liz::Survey::Question::Choice - module for Choice objects of the Survey


SYNOPSIS

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

 $question = $survey->Question;
 $question = $survey->Question( $questionID );

 $choice = $question->Choice( 1 );
 $choice->update;


EXAMPLES


DESCRIPTION

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


BASIC METHODS


new

Create a new Choice object from a Question object.

Input Parameters

 1 Liz::Question object
 2 ordinal number of Choice object
   (default: none = new choice)
Output Parameters

 1 instantiated object
Note

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

Example

 $survey = new Liz::Survey;
 $question = $survey->Question;
 $question = $survey->Question( $questionID );

 $choice = $question->Choice( 1 );


update

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

Output Parameters

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

 $ordinal = $choice->update;


delete

Delete a Liz::Survey::Question::Choice object from the database.

Output Parameters

 1 flag: whether action was successful
Example

 $question->delete;


CONTENT METHODS

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


Data

Set or return the extra data of the Liz::Survey::Question object.

Input Parameters

 1 new extra data
   (default: no change)
Output Parameters

 1 current extra data
Example

 $question->Data( $data );
 $data = $question->Data;


ID

Return the ID of the Liz::Survey::Question::Choice object.

Output Parameters

 1 current ID of the object (is in fact the Question ID)
Example

 $ID = $choice->ID;


Ordinal

Return the ordinal number of the Liz::Survey::Question::Choice object.

Output Parameters

 1 current ordinal number of the choice
Example

 $ordinal = $choice->Ordinal;


Text

Set or return the text of the Liz::Survey::Question object.

Input Parameters

 1 new text
   (default: no change)
Output Parameters

 1 current text
Example

 $question->Text( $text );
 $text = $question->Text;


AUTHOR

Elizabeth Mattijsen ( lizperl@INC.nl )


COPYRIGHT

(C) 1999 International Network Consultants


HISTORY

Version 0.11, 30 September 1999

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

Version 0.1, 17 September 1999

First version of this true Perl module.