NAME
UI::Various::RichTerm::Main - concrete implementation of UI::Various::Main
SYNOPSIS
# This module should never be used directly!
# It is used indirectly via the following:
use UI::Various::Main;
ABSTRACT
This module is the specific implementation of the rich terminal UI. It manages and hides everything specific to it.
DESCRIPTION
The documentation of this module is only intended for developers of the package itself.
FUNCTIONS
_init - initialisation
UI::Various::RichTerm::Main::_init($self);
example:
$_ = UI::Various::core::ui . '::Main::_init';
{ no strict 'refs'; &$_($self); }
parameters:
$self reference to object of abstract parent class
description:
Set-up the rich terminal UI. (It's under FUNCTIONS as it's called before the object is re-blessed as UI::Various::PoorTerm::Main
.)
METHODS
mainloop - main event loop of an application
PoorTerm
's concrete implementation of UI::Various::Main::mainloop
readline - get readline input
$_ = $self->top->readline($prompt, $re_allowed, $history);
parameters:
$self reference to object
$prompt string for the prompt
$re_allowed regular expression for allowed values
$history optional flag to put input into RL history
description:
Prompt for input and get line from Term::ReadLine. The line will be checked against the regular expression. Input is read over again until a valid input is obtained, which is then returned. If the history flag is set, all valid inputs will be put into ReadLine's history.
returns:
valid input
SEE ALSO
UI::Various, UI::Various::Main
LICENSE
Copyright (C) Thomas Dorner.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See LICENSE file for more details.
AUTHOR
Thomas Dorner <dorner@cpan.org>