more perl fixes
This commit is contained in:
@@ -4,6 +4,21 @@
|
||||
|
||||
use strict; use warnings;
|
||||
use HTTP::Tiny; use JSON::PP; use File::Spec;
|
||||
|
||||
# core IO::Socket::IP 0.44 emits a spurious "Use of uninitialized value $err"
|
||||
# warning on every timed connect (getsockopt(SO_ERROR) returns undef when the
|
||||
# connection succeeds). Filter that exact noise out on our side; pass through
|
||||
# everything else.
|
||||
$SIG{__WARN__} = sub {
|
||||
my $m = shift;
|
||||
return if $m =~ /^Use of uninitialized value \$err in numeric eq \(==\) at .*IO\/Socket\/IP\.pm line \d+/;
|
||||
warn $m;
|
||||
};
|
||||
|
||||
# Make STDOUT/STDERR UTF-8 aware so decoded Unicode (model output, tool
|
||||
# results) prints cleanly instead of triggering "Wide character in print".
|
||||
binmode(STDOUT, ':encoding(UTF-8)');
|
||||
binmode(STDERR, ':encoding(UTF-8)');
|
||||
use File::Path qw(make_path); use POSIX qw(strftime); use Term::ReadLine;
|
||||
|
||||
use constant MAX_DEPTH => 5;
|
||||
|
||||
Reference in New Issue
Block a user