Karma::Input::Menu - a versatile class designed to ease the creation of simple user interfaces..
 my $menu = Karma::Input::Menu->new(
        Y => 11,
        X => 16,
        Format  => {
                    Normal   => {
                                  Key  => '^60^b%s ^B^70-',
                                  Name => " ^60^b%s.\n"
                    },
                    Selected => {
                                  Key  => '^60^B%s ^B^70+',
                                  Name => " ^60^B%s.\n"
                    }
        },
        Prompt  => '^00^B[and me]',
        Choices => [
                [ 'w', 'who\'s on',             sub { menu 'nodelist' }         ],
        ]
 );
$menu->become_interactive;
Objects of this package are granted the following methods.
new()The constructor for new menu objects, this method takes its arguments as a list of key => value pairs.
These hashes must each have keys named Key and Name that contain scalar strings to later be used as printf() formats, and then displayed on the screen via printc(). Each of these values should, therefore, contain exactly one printf() conversion code.
If Selected is omitted, then the user will notice no difference between the currently selected menu item and all of the others. However, if defined, the format in Selected will be used to display the selected item in order for it to stand out among its brethren.
Choices should be an anonymous array, in which each element is an anonymous array of the following fields.
 eg. [ 'a', 'add something', sub { $something++ } ]
become_interactive()When called on a menu object already instantiated via new this method will give control to the user, so that they might choose an item. The user will be able to navigate the menu with the $keys, as well as with the arrow-keys on their terminal. The coderef passed to new() for this menu entry will be executed inside an eval once the user has selected an item. Items may be selected by pressing either the return key when the item is highlighted, or by the key bound to the item via new().
This method returns the value of the code executed, and will block until the user makes a decision.