The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Caroline - Yet another line editing library

SYNOPSIS

use Caroline;

my $c = Caroline->new;
while (defined(my $line = $c->readline('> '))) {
    if ($line =~ /\S/) {
        print eval $line;
    }
}

DESCRIPTION

Caroline is yet another line editing library like Term::ReadLine::Gnu.

This module supports

PROJECT GOALS

Provides portable line editing library for Perl5 community.

METHODS

Multi byte character support

If you want to support multi byte characters, you need to set binmode to STDIN. You can add the following code before call Caroline.

use Term::Encoding qw(term_encoding);
my $encoding = term_encoding();
binmode *STDIN, ":encoding(${encoding})";

About east Asian ambiguous width characters

Caroline detects east Asian ambiguous character width from environment variable using Unicode::EastAsianWidth::Detect.

User need to set locale correctly. For more details, please read Unicode::EastAsianWidth::Detect.

LICENSE

Copyright (C) tokuhirom.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

https://github.com/antirez/linenoise/blob/master/linenoise.c

AUTHOR

tokuhirom tokuhirom@gmail.com

mattn