scripts/console: utf8 Kompatibilität und Doku zu Term::ReadLine::Gnu
authorSven Schöling <sven.schoeling@opendynamic.de>
Fri, 5 Jul 2019 17:12:51 +0000 (19:12 +0200)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Mon, 13 Sep 2021 10:34:47 +0000 (12:34 +0200)
SL/InstallationCheck.pm
scripts/console

index 1109897..a3d22d9 100644 (file)
@@ -82,6 +82,7 @@ BEGIN {
 @developer_modules = (
   { name => "DBIx::Log4perl",                      url => "http://search.cpan.org/~mjevans/", },
   { name => "Devel::REPL",                         url => "http://search.cpan.org/~doy/",       debian => 'libdevel-repl-perl' },
+  { name => "Term::ReadLine::Gnu",                 url => "http://search.cpan.org/~hayashi/",   debian => 'libterm-readline-gnu-perl' },
   { name => "Log::Log4perl",                       url => "http://search.cpan.org/~mschilli/",  debian => 'liblog-log4perl-perl' },
   { name => "LWP::Simple",                         url => "http://search.cpan.org/~gaas/",      debian => 'libwww-perl', dist_name => 'libwww-perl' },
   { name => "Moose::Role",                         url => "http://search.cpan.org/~doy/",       debian => 'libmoose-perl' },
index 8bbe93d..bf4ffaa 100755 (executable)
@@ -2,6 +2,8 @@
 
 use warnings;
 use strict;
+use utf8;
+use open qw(:std :utf8);
 use 5.008;                          # too much magic in here to include perl 5.6
 
 BEGIN {
@@ -64,6 +66,10 @@ sub execute_code {
 my $repl = Devel::REPL->new;
 $repl->load_plugin($_) for @plugins;
 $repl->load_history($history_file);
+
+binmode($repl->out_fh, 'utf8');
+
+$repl->eval('use utf8;');
 $repl->eval('help');
 $repl->print("trying to auto login into client '$client' with login '$login'...\n");
 execute_code($repl, "lxinit '$client', '$login'");