Liz::Survey::Answer - module for Answer objects of the Survey
use Liz::Survey; $survey = new Liz::Survey;
$answer = $survey->Answer; $answer = $survey->Answer( $answerID );
$answer->update;
Provide object oriented access to answers in a Survey. Usually not accessed directly, but rather through the Liz::Survey object and its Answer method.
Create a new Answer object from a Survey object.
1 Liz::Survey object 2 ID to created Answer object with (default: none = new answer)
1 instantiated object
It is not intended to call this method directly, but rather indirectly through the Liz::Survey module.
$survey = new Liz::Survey; $answer = $survey->Answer; $answer = $survey->Answer( $answerID );
Update a Answer object in the Liz::Survey database.
1 ID with which the object was updated (undef = error)
$answerID = $answer->update;
Delete a Liz::Survey::Answer object from the database.
1 flag: whether action was successful
$answer->delete;
The following methods allow you to inspect and/or change certain fields of the Liz::Survey::Answer object.
Return the textIDs of the selected choices.
1..N the textIDs of the selected choices
foreach ($answer->ChosenTextIDs) {
print "$_\n";
}
#INHERITED FROM Liz::Survey
#-----------------------------------------------------------
Return the texts of the selected choices.
1..N the texts of the selected choices
foreach ($answer->ChosenTexts) {
print "$_\n";
}
#INHERITED FROM Liz::Survey #-----------------------------------------------------------
Return the Created timestamp of the Liz::Survey::Answer object.
1 current timestamp value of the Created date
$created = $answer->Created;
Set or return the email address of the Liz::Survey::Answer object.
1 new email address of the object (default: no change)
1 current email address of the object
$answer->Email( $email ); $email = $answer->Email;
Return the ID of the Liz::Survey::Answer object.
1 current ID of the object
$ID = $answer->ID;
Set or return the IP-number of the Liz::Survey::Answer object.
1 new IP-number of the object (default: no change)
1 current IP-number of the object
$answer->IP( $ENV{'REMOTE_ADDR'} );
$IP = $answer->IP;
Set or return the session key of the Liz::Survey::Answer object.
1 new session key of the object (default: no change)
1 current session key of the object
$answer->Session( $ENV{'AUTOMATICSESSIONCOOKIE'} );
$session = $answer->Session;
Set or return the status of the Liz::Survey::Answer object.
1 new status of the object (default: no change)
1 current status of the object
$answer->Status( 1 ); $status = $answer->Status;
Return the Updated timestamp of the Liz::Survey::Answer object.
1 current timestamp value of the Updated date
$updated = $answer->Updated;
Set or return the visitor key of the Liz::Survey::Answer object.
1 new visitor key of the object (default: no change)
1 current visitor key of the object
$answer->Visitor( $ENV{'VISITORID'} );
$visitor = $answer->Visitor;
Elizabeth Mattijsen ( lizperl@INC.nl )
(C) 1999 International Network Consultants
Now no longer puts Exporter in ISA: it was not needed.
Method new now properly sets the SURVEY field.
First version of this true Perl module.