octave: Missing Components

 
 37.4.4 Missing Components
 -------------------------
 
 If a package relies on a component, such as another Octave package, that
 may not be present it may be useful to install a function which informs
 users what to do when a particular component is missing.  The function
 must be written by the package maintainer and registered with Octave
 using ‘missing_component_hook’.
 
  -- : VAL = missing_component_hook ()
  -- : OLD_VAL = missing_component_hook (NEW_VAL)
  -- : missing_component_hook (NEW_VAL, "local")
      Query or set the internal variable that specifies the function to
      call when a component of Octave is missing.
 
      This can be useful for packagers that may split the Octave
      installation into multiple sub-packages, for example, to provide a
      hint to users for how to install the missing components.
 
      When called from inside a function with the "local" option, the
      variable is changed locally for the function and any subroutines it
      calls.  The original variable value is restored when exiting the
      function.
 
      The hook function is expected to be of the form
 
           FCN (COMPONENT)
 
      Octave will call FCN with the name of the function that requires
      the component and a string describing the missing component.  The
      hook function should return an error message to be displayed.
 
      See also: Seemissing_function_hook XREFmissing_function_hook.