Subject: | Tree::DAG_Node mucks with STDIN/STDOUT |
Date: | Tue, 28 Jul 2015 18:27:04 +0200 |
To: | bug-Tree-DAG_Node [...] rt.cpan.org |
From: | Marc Lehmann <schmorp [...] schmorp.de> |
Hi!
We sometimes have crashes when loading Tree::DAG_Node in one of our
servers.
The reason turned out to be Tree::DAG_Node mucking with
STDIN/STDOUT/STDERR in rather unexpected ways:
use open qw(:std :utf8); # Undeclared streams in UTF-8.
This caused data corruption because it ignores the user/program-configured
encoding and enforces utf-8. For streams that do not support this, you get a
crash on loading, for others you get silent data corruption.
I suggest simply dropping this line - modules should not silently
change STDIN/OUT/ERR, especially not on loading, when they ahve nothing
whatsoever to do with these handles.
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / schmorp@schmorp.de
-=====/_/_//_/\_,_/ /_/\_\