Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Solved: Re: Test::Exception error on Strawberry Perl 5.14.3 ('Bareword "xception" ...') [ Bug in Perl ]

by 1nickt (Abbot)
on Jul 29, 2015 at 22:04 UTC ( #1136800=note: print w/replies, xml ) Need Help??


in reply to Test::Exception error on Strawberry Perl 5.14.3 ('Bareword "xception" ...')

Hi, replying to myself for the archives. Thanks to Alexandr Ciornii (chorny) of CPAN testers, I've narrowed this down to an apparent bug in Strawberry Perl 5.14.3 .

I don't have a Win32 machine myself but chorny was kind enough to test a minimal script with only:

use open ':std', ':encoding(utf8)'; use Test::Exception;

and it threw the same error. Removing the 'use open' line fixed the problem as syphilis guessed.

I installed 5.14.3 on my OS X machine and the test passes fine so it appears to be that particular version of Strawberry Perl.

Not going to file a bug report because I can't provide any useful diagnostic info. If anyone with Strawberry Perl 5.14.3 wished to do so, the gods would smile upon her or him.

The way forward always starts with a minimal test.
  • Comment on Solved: Re: Test::Exception error on Strawberry Perl 5.14.3 ('Bareword "xception" ...') [ Bug in Perl ]
  • Download Code

Replies are listed 'Best First'.
Re: Solved: Re: Test::Exception error on Strawberry Perl 5.14.3 ('Bareword "xception" ...') [ Bug in Perl ]
by Anonymous Monk on Jul 30, 2015 at 00:17 UTC
    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

        Thank you for digging into this. I also learned that 5.14.3 is not officially supported, so I am inclined not to worry about the bug and the test failure.

        I would like to have zero test failures, however, so I am thinking I will change the use open() call to a use if ... statement so it doesn't load under the broken perl/OS combo.


        The way forward always starts with a minimal test.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1136800]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2019-07-21 19:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If you were the first to set foot on the Moon, what would be your epigram?






    Results (9 votes). Check out past polls.

    Notices?