What’s a module and how do I create one ?

When you create a Search Task or a Search And Replace Task, you have the option of saving the task as a module for later use. To create a module you just save the task you are working on in the way you would save a file in any other application. The module is saved as XML.

What can I do with modules ?

You can reload them for reuse or you can refer to them within other modules. Modules can be referenced within other modules in one two ways: a Module Insertion or a Module call. Module Calls are not currently convertible to code snippets.

Module Insertions

Module Insertions are a shorthand way of including a module inside another module. It’s much like if you copy the contents of the referenced module into the insertion point. However instead of the module’s contents, you see a reference to the inserted module. The key benefits are:

  1. Abstraction: When you build a complex module using module insertions, it’s much easier to maintain an overview of your module’s design.
  2. Reusability: You can test and debug the module to be inserted and then reuse it in any module in the future. If it turns out the module to be inserted has a bug, then you just need to fix the problem once rather than modifying all the modules referencing it;
  3. Safety: Module insertion references protect the content in the referenced module from accidental changes. Adding a module insertion reference is also less error prone than copying chunking of an expression around.

Function Calls

Function Calls work by passing a text string to another module and receiving the processed string in return. The text string you pass can be a predefined string or (probably more usefully) a string you have captured during processing.