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

STDERR tests may fail because of Locale::* deprecation #4

Open
eserte opened this Issue Nov 17, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@eserte
Copy link

eserte commented Nov 17, 2018

With perl 5.28.0, if Locale::Country was not reinstalled from CPAN:

#   Failed test 'no scheme'
#   at t/scheme.t line 14.
# STDERR is:
# Locale::Country will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at /home/cpansand/.cpan/build/2018111706/HTML-HTML5-Sanity-0.105-2/blib/lib/HTML/HTML5/Sanity.pm, line 23.
# Locale::Codes will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at /opt/perl-5.28.0/lib/5.28.0/Locale/Country.pm, line 22.
# RDF contains no skos:ConceptScheme
# 
# not:
# RDF contains no skos:ConceptScheme
# 
# as expected

#   Failed test 'not the right scheme'
#   at t/scheme.t line 20.
# STDERR is:
# Locale::Country will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at /home/cpansand/.cpan/build/2018111706/HTML-HTML5-Sanity-0.105-2/blib/lib/HTML/HTML5/Sanity.pm, line 23.
# Locale::Codes will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at /opt/perl-5.28.0/lib/5.28.0/Locale/Country.pm, line 22.
# Concept scheme <x:y> not found or incomplete
# 
# not:
# Concept scheme <x:y> not found or incomplete
# 
# as expected

#   Failed test 'convert scheme'
#   at t/scheme.t line 25.
# STDERR is:
# Locale::Country will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at /home/cpansand/.cpan/build/2018111706/HTML-HTML5-Sanity-0.105-2/blib/lib/HTML/HTML5/Sanity.pm, line 23.
# Locale::Codes will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at /opt/perl-5.28.0/lib/5.28.0/Locale/Country.pm, line 22.
# No concepts found
# 
# not:
# No concepts found
# 
# as expected
# Looks like you failed 3 tests of 7.
t/scheme.t .............. 
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/7 subtests 

#   Failed test 'help by default'
#   at t/script.t line 8.
# STDERR:
# Locale::Country will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at /home/cpansand/.cpan/build/2018111706/HTML-HTML5-Sanity-0.105-2/blib/lib/HTML/HTML5/Sanity.pm, line 23.
# Locale::Codes will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at /opt/perl-5.28.0/lib/5.28.0/Locale/Country.pm, line 22.
# 
# doesn't match:
# (?^u:^$)
# as expected

#   Failed test 'check directory'
#   at t/script.t line 11.
# STDERR is:
# Locale::Country will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at /home/cpansand/.cpan/build/2018111706/HTML-HTML5-Sanity-0.105-2/blib/lib/HTML/HTML5/Sanity.pm, line 23.
# Locale::Codes will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at /opt/perl-5.28.0/lib/5.28.0/Locale/Country.pm, line 22.
# output directory not found: t/xxx
# 
# not:
# output directory not found: t/xxx
# 
# as expected
# Looks like you failed 2 tests of 4.
t/script.t .............. 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/4 subtests 

The same kind of error is discussed in kasei/atteanx-rdfquerytranslator#1

@eserte

This comment has been minimized.

Copy link
Author

eserte commented Mar 7, 2019

My suggestion (untested pseudo code; exact required Locale::Country version has to be put in place of the ???):

my $locale_country_version = 0;
if ($] >= 5.028 && eval { require Locale::Country; 1 } && $Locale::Country::VERSION < ???) {
    $locale_country_version = ???;
}
...
WriteMakefile(..., PREREQ_PM => { ..., "Locale::Country" => $locale_country_version, }, ...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.