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::RichTerm::Main
.)
METHODS
mainloop - main event loop of an application
RichTerm
's concrete implementation of UI::Various::Main::mainloop
readline - get readline input
$_ = $self->top->readline($prompt, $re_allowed, $initial_value);
parameters:
$self reference to object
$prompt string for the prompt
$re_allowed regular expression for allowed values
$initial_value initial value for input and flag for 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 optional initial value is set, it will be used passed as 2nd parameter to readline
(PREPUT argument). It also activates storing a valid input in 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>