Stefano Corsi > Quizzer-0.08 > Quizzer::Loader

Download:
Quizzer-0.08.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Quizzer::Loader - Quizzer Loader

DESCRIPTION ^

This package contains some helper functions taken by Joey Hess's ConfigDb module.

METHODS ^

getquestion

Pass in the name of the question and this will return the specified question object.

gettree

Pass in a string denoting the root of a tree of questions in the question hierarchy. All questions under that root will be returned.

isunder

Pass in a string denoting the root of a tree of questions in the question hierarchy, and a Question. If the Question is under that tree, a true value is returned.

loadtemplatefile

Loads up a file containing templates (pass the filename to load). Creates Template objects and corresponding Question objects. The second parameter is the name of the owner of the created templates and questions.

loadtemplatedata

Pass this a string containing one of more templates, and it will process it and instantiate the Template objects and corresponding Question objects.

The second parameter is the name of the owner of the created templates and questions.

addquestion

Create a Question and add it to the database. Pass the name of the template the question will use, and the name to use for the question. Finally, pass the name of the owner of the new question.

If a question by this name already exists, it will be modified to add the new owner and to use the correct template.

disownquestion

Give up ownership of a given question. Pass the name of the question and the owner that is giving it up. When the number of owners reaches 0, the question itself is removed. If the template the question used has no more questions using it, it too is removed.

disownall

This runs disownquestion() on all Questions. Pass the owner.

AUTHOR ^

Joey Hess <joey@kitenet.net> Modified by Stefano Corsi <ippo@madeinlinux.com>

syntax highlighting: