Comments (8)
There's something wrong on that test box, the locale specific string is already being checked, not the literal "Invalid argument":
https://metacpan.org/source/CALID/ZMQ-FFI-0.17/t/errors.t#L21
I'm also able to install locally under the german locale without issue...
http://pastebin.com/Bxwk5g5R
from perlzmq.
The mentioned fail report is from perl 5.21.8. Bleadperl behaves differently than earlier perls:
$ env LC_ALL=de_DE.UTF_8 perl5.21.9 -E '$!=1; say "$!"'
Operation not permitted
$ env LC_ALL=de_DE.UTF_8 perl5.20.2 -E '$!=1; say "$!"'
Die Operation ist nicht erlaubt
from perlzmq.
And it is the locale, here's a pass/fail pair from the perl version on the same box, just with different LC_ALL settings (C vs. de_DE.UTF-8):
- http://www.cpantesters.org/cpan/report/af937d90-b9d2-11e4-8430-2395e0bfc7aa
- http://www.cpantesters.org/cpan/report/914bfcea-b9d2-11e4-b3ef-c494e0bfc7aa
from perlzmq.
hmm, this looks like a bug in the latest Perl... it's not honoring the locale when string-ifying $!
. You should report this as a bug in Perl itself.
from perlzmq.
To expand a bit, ZMQ::FFI gets the error string by using zmq_strerror. This returns the properly localized error string. Then in the test, I get the expected localized error string by simply setting $!
to EINVAL and stringifying it. In previous Perl versions this worked, but as your comment above demonstrates this is broken in the latest Perl... it's always producing the english version of $!
.
from perlzmq.
No, this is an intentional change in perl 5.21.x. To get the localized stringified $!, you have to enclose it in use locale
now. From perl5211delta.pod:
"$!" text is now in English outside "use locale" scope
Previously, the text, unlike almost everything else, always came out
based on the current underlying locale of the program. (Also affected on
some systems is ""$^E"".) For programs that are unprepared to handle
locale, this can cause garbage text to be displayed. It's better to
display text that is translatable via some tool than garbage text which
is much harder to figure out.
from perlzmq.
@eserte I believe this should be resolved now. Let me know if you have any further issues.
from perlzmq.
I think the change looks good. Will know for sure when you're releasing a new version to cpan and cpantesters.
from perlzmq.
Related Issues (20)
- Segfault when using EV version 3 HOT 1
- user linger value is clobbered HOT 1
- segfault during global destruction HOT 1
- test hangs with some versions of Socket HOT 2
- zmq_poll function missing ? HOT 11
- Sockets do not keep alive contexts. HOT 4
- support exporting zmq constants directly from ZMQ::FFI
- Add missing socket api methods to SocketRole requires HOT 1
- DEALER-REP hangs forever HOT 9
- Faster get/set on sockets HOT 1
- using proxy results in high cpu usage HOT 4
- Context object still keeps around socket objects after they go out of scope HOT 3
- Unable to build a release with SELinux enabled on system HOT 1
- Unable to build a release with a perl compiled with clang HOT 1
- zmq-ffi: t/proxy.t occasionally hangs HOT 26
- zmq_bind: Protocol not supported HOT 2
- Fails to install on CentOS HOT 4
- FFI::Platypus should be specified as configure_requires HOT 1
- Tests will fail in perl-5.38.0
- dealer with AE::io don't get any event when watch_write is 0 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from perlzmq.