Quizzer::Question - Question object
This is an object that represents a Question. Each Question has some associated data. To get at this data, just use $question->fieldname to read a field, and $question->fieldname(value) to write a field. Any field names at all can be used, the convention is to lower-case their names, and prefix the names of fields that are flags with "flag_". If a field that is not defined is read, and a field by the same name exists on the Template the Question is mapped to, the value of that field will be returned instead.
Returns a new Question object.
Returns the description of this Question. This value is taken from the Template the Question is mapped to, and then any substitutions in the description are expanded.
Returns the abswer to this Question. This value is taken from the Template the Question is mapped to, and then any substitutions in the answer are expanded.
Returns the alternative answer to this Question. This is used when you want to allow an alternative answer to a Question (expecially questions where answers are provided by means of a String text field ...). This value is taken from the Template the Question is mapped to, and then any substitutions in the answer are expanded.
Returns the explanation of this Question. This value is taken from the Template the Question is mapped to, and then any substitutions in the explanation are expanded.
Returns the extended description of this Question. This value is taken from the Template the Question is mapped to, and then any substitutions in the extended description are expanded.
Returns the choices field of this Question. This value is taken from the Template the Question is mapped to, and then any substitutions in it are expanded.
This takes the result of the choices method and simply splits it up into individual choices and returns them as a list.
Access the variables hash, which is a hash of values that are used in the above substitutions. Pass in no parameters to get the full hash. Pass in one parameter to get the value of that hash key. Pass in two parameters to set a hash key to a value.
Get the current value of this Question. Will return the default value is there is no value set. Pass in a value to set the value.
This takes the result of the value method and simply splits it up into individual values and returns them as a list.
This method allows you to get/set the owners of a Question. The owners are returned in a comma and space delimited list, a similar list should be passed in if you wish to use this function to set them. (Internally, the owners are stored quite differently..)
Add an owner to the list of owners of this Question. Pass the owner name. Adding an owner that is already listed has no effect.
Remove an owner from the list of owners of this Question. Pass the owner name to remove.
Joey Hess <joey@kitenet.net>
To install Quizzer::Log, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Quizzer::Log
CPAN shell
perl -MCPAN -e shell install Quizzer::Log
For more information on module installation, please visit the detailed CPAN module installation guide.