Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail with Encode 2.90 #2

Closed
eserte opened this issue Sep 12, 2017 · 3 comments
Closed

Tests fail with Encode 2.90 #2

eserte opened this issue Sep 12, 2017 · 3 comments

Comments

@eserte
Copy link

eserte commented Sep 12, 2017

On a few of my smokers I see the following test failure:

#   Failed test 'TeX/Encode.pm loaded ok'
#   at t/00-compile.t line 45.
#          got: '512'
#     expected: '0'
Can't locate object method "Define" via package "Encode::utf8" at /opt/perl-5.16.3/lib/site_perl/5.16.3/x86_64-linux/Encode.pm line 346.
Compilation failed in require at /opt/perl-5.16.3/lib/site_perl/5.16.3/x86_64-linux/Encode/Encoding.pm line 11.
BEGIN failed--compilation aborted at /opt/perl-5.16.3/lib/site_perl/5.16.3/x86_64-linux/Encode/Encoding.pm line 11.
Compilation failed in require at /tmpfs/.cpan-build-cpansand/2017091209/TeX-Encode-2.002-12/blib/lib/TeX/Encode.pm line 8.
BEGIN failed--compilation aborted at /tmpfs/.cpan-build-cpansand/2017091209/TeX-Encode-2.002-12/blib/lib/TeX/Encode.pm line 8.
Compilation failed in require at -e line 1.

This seems to happen if Encode 2.90 is installed. Statistical analysis (theta=-1 means "bad"):

****************************************************************
Regression 'mod:Encode'
****************************************************************
Name           	       Theta	      StdErr	 T-stat
[0='const']    	      1.0000	      0.0000	2807078820829434.50
[1='eq_2.89']  	     -0.0000	      0.0000	  -0.20
[2='eq_2.90']  	     -1.0000	      0.0000	-2431001569263556.50
[3='eq_2.91']  	     -0.0000	      0.0000	  -0.64
[4='eq_2.92']  	     -0.0000	      0.0000	  -1.48

R^2= 1.000, N= 52, K= 5
****************************************************************

To avoid such test failures it's probably best to set a higher prereq version if Encode 2.90 is detected. E.g. like this (untested):

my $Encode_version = 0;
if (eval { require Encode; $Encode::VERSION == 2.90 }) {
    $Encode_version = 2.91;
}
...
PREREQ_PM => { Encode => $Encode_version }
@a3f
Copy link
Member

a3f commented Sep 12, 2017

Thanks for your report. I will find out how to do it in Dist::Zilla and update the module appropriately.

@a3f a3f closed this as completed in fa4a12d Sep 12, 2017
@a3f a3f reopened this Sep 12, 2017
@a3f
Copy link
Member

a3f commented Sep 12, 2017

I've released it to CPAN. Would be nice if you could check it now does what it should.

@a3f a3f closed this as completed Sep 12, 2017
@eserte
Copy link
Author

eserte commented Sep 12, 2017

This looks good:

$ perl5.16.3 Makefile.PL 
Warning: prerequisite Encode 2.91 not found. We have 2.90.
Generating a Unix-style Makefile
Writing Makefile for TeX::Encode
Writing MYMETA.yml and MYMETA.json

And the prereq upgrade does not happen if Encode 2.89 or 2.91 is installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants