SIL::Shoe::Control - Abstract superclass for SF Control files in Shoebox
This class parses a control file based on a parsing model passed by the subclass. It handles groups and all the vagueries currently encountered in Shoebox control files.
The following methods are available:
This creates a new type object, but only reads the name of the database type. This allows SIL::Shoe::Settings to read all the type files without filling up memory. The settings file is only fully read when $s->read is called.
This reads the type file into memory and readjusts everything to make stuff easier to find.
Subclasses should provide this method to return details of how to parse a particular group instruction. The return value is an array reference with two elements: Type and parameter, according to the following format.
tells what to do with various group type markers. First char == 0 -> delete group marker and do nothing. Has the effect of moving the group contents up one level into the outer layer. OK if no name clashes will occur. h -> make a hash against the second parameter, then use the value against the group marker to make another hash within that. Can't have multiple identical values in this setup. a -> make an array against the group name and then make a hash within that which has an element named by the second parameter into which goes the value against the group marker. l -> the contents of the group are strictly held in lines and not processed as markers. If the second parameter is present then the value of the marker identifies the list within an associative array named by the parameter. If not, then the list is stored according to the marker name, and the value, if present is stored as part of the list.
Returns whether this marker takes multiline or wrapped line data.