This is funny first two loop forever high CPU (trace says at binmode STDERR), the last one doesn't
perl -d:Trace -e " eval q{ use open qw/ :std :encoding(utf8) /; use T
+est::Exception; }; warn $@ " 2>2
perl -MCarp::Always -e " use open qw/ :std :encoding(UTF-8) /; use Te
+st::Exception; "
perl -e " use open qw/ :std :encoding(UTF-8) /; use Test::Exception;
+"
happens on both v5.12.2 and v5.14.1,
5.14.1 has
Encode 2.47
Encode::Alias 2.16
Encode::Config 2.05
Encode::Encoding 2.05
Exporter 5.66
Exporter::Heavy 5.66
PerlIO 1.07
PerlIO::encoding 0.14
Sub::Uplevel 0.24
Test::Builder 0.98
Test::Exception 0.31
XSLoader 0.15
base 2.18
bytes 1.04
constant 1.21
open 1.08
vars 1.02
warnings 1.12
warnings::register 1.02
5.12.2 has
Encode 2.43
Encode::Alias 2.14
Encode::Config 2.05
Encode::Encoding 2.05
Exporter 5.64_01
Exporter::Heavy 5.64_01
PerlIO 1.06
PerlIO::encoding 0.12
Sub::Uplevel 0.22
Test::Builder 0.98
Test::Exception 0.31
XSLoader 0.15
base 2.15
bytes 1.04
open 1.07
vars 1.01
warnings 1.09
warnings::register 1.01
Definitely an perl/perlio/open/Encode bug ... here is why I think that
$ set PERL_ENCODE_DEBUG=999
$ perl -e " use Devel::Modlist; use open qw/ :std :encoding(utf8) /; u
+se Test::Exception; "
Encode::utf8 XS on at C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/Enco
+de.pm line 298.
Bareword "xception" not allowed while "strict subs" in use at C:/perl/
+site/5.14.1/lib/Test/Exception.pm line 4.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
$ perl -e " use Devel::Modlist; use open qw/ :std :encoding(UTF-8) /;
+use Test::Exception; "
Encode::utf8 XS on at C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/Enco
+de.pm line 298.
eval "utf-8-strict" at C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/Enc
+ode/Alias.pm line 32.
(?^i:\bUTF-8$), utf-8-strict at C:/perl/5.14.1/lib/MSWin32-x86-multi-t
+hread/Encode/Alias.pm line 45.
find_alias(Encode, UTF-8)->name = utf-8-strict at C:/perl/5.14.1/lib/M
+SWin32-x86-multi-thread/Encode/Alias.pm line 75.
find_alias(Encode, UTF-8)->name = utf-8-strict at C:/perl/5.14.1/lib/M
+SWin32-x86-multi-thread/Encode/Alias.pm line 75.
$ perl -e " use Devel::Modlist; use Test::Exception; use open qw/ :st
+d :encoding(UTF-8) /; "
Encode::utf8 XS on at C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/Enco
+de.pm line 298.
eval "utf-8-strict" at C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/Enc
+ode/Alias.pm line 32.
(?^i:\bUTF-8$), utf-8-strict at C:/perl/5.14.1/lib/MSWin32-x86-multi-t
+hread/Encode/Alias.pm line 45.
find_alias(Encode, UTF-8)->name = utf-8-strict at C:/perl/5.14.1/lib/M
+SWin32-x86-multi-thread/Encode/Alias.pm line 75.
find_alias(Encode, UTF-8)->name = utf-8-strict at C:/perl/5.14.1/lib/M
+SWin32-x86-multi-thread/Encode/Alias.pm line 75.
$ perl -e " use Devel::Modlist; use Test::Exception; use open qw/ :st
+d :encoding(utf8) /; "
Encode::utf8 XS on at C:/perl/5.14.1/lib/MSWin32-x86-multi-thread/Enco
+de.pm line 298.
Config
Encode 2.47
Encode::Alias 2.16
Encode::Config 2.05
Encode::Encoding 2.05
Exporter 5.66
Exporter::Heavy 5.66
PerlIO 1.07
PerlIO::encoding 0.14
Sub::Uplevel 0.24
Test::Builder 0.98
Test::Exception 0.31
XSLoader 0.15
base 2.18
bytes 1.04
constant 1.21
open 1.08
vars 1.02
warnings 1.12
warnings::register 1.02
Basically a serious bug is in there in XS land somewhere, will see what happens after upgrades
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.