-
Notifications
You must be signed in to change notification settings - Fork 0
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
Avoid the use and need of warnings FATAL in t/destinations.t #1
Comments
That slice shouldn't autovivify in the first place, both elements should exist. Can you tell me the output of:
|
Is there a serious reason to use warnings FATAL?
See also: |
No there isn't, but unfatalizing the warning doesn't eliminate the problem it's pointing at. Either something is wrong with my code, or something is wrong with cperl, and I'd like to know which. |
On further inspection it seems the cperl warning is wrong (it warns for any slice-as-argument, not only when it actually autovivifies). This warning is decidedly non-helpful. |
Sure, unfatalizing doesn't eliminate the problem. But I do not see the benefit of FATAL, especially in a test script. Maybe it makes sense in a developer release during a phase on CPAN-testers. At the user (sysadmin, cpan author, end user) it crashes, the installation fails. This can happen with new versions of perl5 or other implementations inventing new warnings. What will the user do?
If it's unfatalized the test still throws a warning, but the installation works. A minority can still submit an issue. The pragmatic sense of a warning is giving a hint about a potential problem. In this case it warns at compile time that that autovivification of slice-as-argument is not supported by cperl, while P5P-perl still supports this buggy (inconsistent behaviour, bug not solved in 19 years) feature. Using I agree, that this warning is a little bit unlucky. But it is AFAIK only in cperl-5.28.x and will be removed in cperl-5.30. |
To the contrary, tests are the only place where it makes sense. In fact, it's probably better to use a module like Test::Warnings to make sure all warnings generate a test failure, instead of only ones in the test file. Tests are exactly the right time to be strict.
You're forgetting one option:
|
I see, you are putting more energy in defending than improving. I want my modules as portable and stable as possible, including cperl. |
Quite frankly I find making this personal incredibly rude. You come here not with a problem, but dive straight towards a solution. I rejected that solution, but not without explaining why. You're free to suggest other solutions to your problem, but this accusatory attitude is not appreciated. |
That's your point of view, mine is opposite. |
MacOS 10.14.1
perlbrew
cperl5.28.1
cpanm install
Relevant parts of build.log
The text was updated successfully, but these errors were encountered: