Describe spell file execution here.
spell file execution in devel/v1.14 sorcery is unified such that all files, except DETAILS, are run through the function run_spell_file
For a given spell file, "FOOBAR": (replace 'FOOBAR' with a spell file name, likewise for 'foobar')
run_spell_file implements spell file inheritance: For a given spell file (ie FOOBAR), sorcery executes the first available option of the following:
Option 1: the spell's file (FOOBAR) Option 2: eval of the contents of a variable named <spell file name>_CMD (ie FOOBAR_CMD) Option 3: the default function (default_foobar)
Spell files must be marked executable (chmod +x), DETAILS can define FOOBAR_CMD. The base level default function is defined by sorcery, it can be called by any grimoire code as 'default_sorcery_foobar'. The grimoire level FUNCTION file may override the sorcery default by defining 'default_grimoire_foobar'. Similarly, a section level FUNCTION file may override the default for its section with 'default_section_foobar'. These three functions form an inheritence hierarchy. The last level of this hierarchy is the spell's FOOBAR file, if it exists.
Calling 'default_foobar' will always invoke the default function for the next level up in the defaults hierarchy. For example if 'FOOBAR' calls default_foobar, default_section_foobar is invoked. If default_section_foobar calls default_foobar, default_grimoire_foobar is invoked. If default_grimoire_foobar invokes default_foobar, then default_sorcery_foobar is executed. Sorcery guarantees that some default_sorcery_foobar exists, unless noted otherwise it is simply the "true" command.
