NAME
App::Dochazka::CLI::CommandMap - Command map
VERSION
Version 0.154
PACKAGE VARIABLES
FUNCTIONS
generate_semantic_tree
Generate the semantic context tree.
The set of keys of %$dispatch_map
contains all the possible commands, expressed as tokens. The semantic context tree is generated from the dispatch map keys. Each level of the tree corresponds to a number of tokens - so the set of level-one nodes represents the set of all possible tokens that can appear in the first position. These are children of the root node.
All nodes at level two have a parent in level one, etc. The set of immediate child nodes of any given node corresponds to the set of all possible tokens that can follow that token.
look_up_command
Given a normalized command string such as "GET BUGREPORT", look it up in the dispatch map and return the corresponding coderef, or nothing if the lookup fails.
go_exit
Return the "magic" status code that causes dochazka-cli to exit.