Next: , Previous: Replacements, Up: Getstats Internals



7.4 Internal Representation of Transformations

Each transformation is represented as a Perl array. The first element is a command that defines the transformation. For example ["noop"] is a no-op transformation. The remaining fields of the array are arguments. For example, ["echo", "Hello,", "world."] is an echo transformation that prints Hello, world.. The arguments need not be strings, for example block is a list of further transformations:

     ["block",
     	["echo", "Mary had a little lamb,"],
     	["echo", "whose fleece was white as snow."],
     	["echo", "And everywhere that Mary went,"],
     	["echo", "the lamb was sure to go."],
     ]

Other transformations take other types of arguments (e.g., aggregate takes a hash).

The command must be one of the 20 basic transformations described in this document, or a function defined in the %functions hash.