-
Notifications
You must be signed in to change notification settings - Fork 42
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
ARGV tests failing with utf8-all 0.013 or later #279
Comments
Also reported in Debian at https://bugs.debian.org/759969 Adding "use utf8;" to each of the failing .t files solves the issue for me, but possibly defeats the purpose of these tests. |
Fedora bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1134872 |
The test suite also passes if I apply this change, though I don't know if it's the right thing to do really:
|
This failure started with this utf8-all commit:
which was motivated by [https://github.com/doherty/utf8-all/issues/18] bug report ("Currently, utf8::all decodes @argv the first time it's imported from any module. I think this is wrong. IMHO"). The change in utf8::all::import() was:
which had wrong condition. The condition changed over releases and current 0.15 contains:
At my first look, the condition is still wrong: At first call from 'main' package, the $have_encoded_argv is 0, ++ has higher priority than !, so the evaluation is "&& !0++" → "&&!1" → "&&0". I.e. the @argv is never recoded. Am I right? |
Taking back the last paragraph. The condition is good. because $variable++ return original value. |
The xtaran's propal is wrong as undermines the test (to set @argv as bytes and get it as UTF-8 decoded characters). The pghmcfc's patch is correct as the issue is appearing perl5i on the call stack. |
Addresses evalEmpire#279 Loads utf8::all in the caller to get the desired behaviour.
Changing utf8-all from 0.011 to 0.013 or later results in test failures:
The text was updated successfully, but these errors were encountered: