Orkun Karaduman

NAME

Term::ReadLine::Tiny::readline - A non-OO package of Term::ReadLine::Tiny

VERSION

version 1.09

SYNOPSIS

        use Term::ReadLine::Tiny::readline;
        
        while ( defined($_ = readline("Prompt: ")) )
        {
                print "$_\n";
        }
        print "\n";
        
        $s = "";
        while ( defined($_ = readkey(1)) )
        {
                $s .= $_;
        }
        print "\n$s\n";

Functions

readline([$prompt[, $default[, IN[, OUT]]]])

interactively gets an input line. Trailing newline is removed.

Returns undef on EOF.

readkey([$echo[, IN[, OUT]]])

reads a key from input and echoes if echo argument is TRUE.

Returns undef on EOF.

SEE ALSO

REPOSITORY

GitHub https://github.com/orkunkaraduman/p5-Term-ReadLine-Tiny

CPAN https://metacpan.org/release/Term-ReadLine-Tiny

AUTHOR

Orkun Karaduman <orkunkaraduman@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2017 Orkun Karaduman <orkunkaraduman@gmail.com>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.