Fix _sub_attrs for perl 5.37.9#9
Conversation
In Perl/perl5#20357 we fixed an inconsistency in how eval EXPR handles compile errors so that the behavior is consistent regardless of the number or type of compile errors that are encountered. This means that $SIG{__DIE__} is called if there is an error compiling the code regardless of how the code fails to compile. The _sub_attrs() function does not localize $SIG{__DIE__} when it probes to see if the coderef is an lvalue function. This then breaks modules like MIME::Signature, see fany/MIME-Signature#3 and Perl/perl5#20885 and also https://rt.cpan.org/Ticket/Display.html?id=146848 for relevant bug reports. This patch fixes these issues.
Class::Method::Modifiers version < 2.16 are subtly broken in Perl 5.37.9, this in turn breaks MIME::Signature/MIME::Disclaimer. I have created moose/Class-Method-Modifiers#9 which should fix Class::Method::Modifiers. This patch should be applied once that (or an equivalent fix) is merged and a new version is released. I have asked the owner of that repo to coordinate with this PR. See: Perl/perl5#20357 https://rt.cpan.org/Ticket/Display.html?id=146848 Perl/perl5#20885 fany#3
|
Can you change this to only include the |
|
Done. |
Class::Method::Modifiers version < 2.15 are subtly broken in Perl 5.37.9, this in turn breaks MIME::Signature/MIME::Disclaimer. I have created moose/Class-Method-Modifiers#9 which should fix Class::Method::Modifiers. This patch should be applied once that (or an equivalent fix) is merged and a new version is released. I have asked the owner of that repo to coordinate with this PR. See: Perl/perl5#20357 https://rt.cpan.org/Ticket/Display.html?id=146848 Perl/perl5#20885 fany#3
|
I am Canadian and did the last release; using the en_US, en_CA and en_UK aspell dictionaries there are no errors reported. |
|
On Thu, 2 Mar 2023 at 18:16, Karen Etheridge ***@***.***> wrote:
I am Canadian and did the last release; using the en_US, en_CA and en_UK
aspell dictionaries there are no errors reported.
I am too. But you are using the US spelling. What are your env vars? I
suspect the tests are using 'LANG'. Graham said that Test::Spelling
"doesn't have a way to provide a language. i'm sure an env var could help,
but it's still dependent on what dictionaries you have installed. and then
autodetects one of 4 different spell checkers, which have different
behavior regarding contractions and other stuff."
$ env | grep 'LANG\|LC' | sort
GDM_LANG=en_US
LANG=en_CA.utf8
LANGUAGE=en_US
LC_ADDRESS=nl_NL.UTF-8
LC_IDENTIFICATION=nl_NL.UTF-8
LC_MEASUREMENT=nl_NL.UTF-8
LC_MONETARY=nl_NL.UTF-8
LC_NAME=nl_NL.UTF-8
LC_NUMERIC=en_CA.UTF-8
LC_PAPER=nl_NL.UTF-8
LC_TELEPHONE=nl_NL.UTF-8
cheers,
Yves
…--
perl -Mre=debug -e "/just|another|perl|hacker/"
|
|
This doesn't seem to have happened -- those two commits are still here. You would need to |
3f7c698 to
602a6b4
Compare
|
"force-with-lease"? Never used that, and it wasn't necessary FWIW. I just fat fingered it earlier and pushed to my master and not to my branch. |
Huh. I don't get it, did you add "behavior" to your dictionary? That isn't UK/Canadian spelling: https://www.btb.termiumplus.gc.ca/tpv2guides/guides/wrtps/index-eng.html?lang=eng&lettr=indx_catlog_b&page=9U6Ot1RIV-vo.html Anyway, doesn't matter, except if you are interested in getting to the bottom of why your tests and mine for the same thing don't produce the same results. |
|
As I said, I have the en_US, en_CA and en_UK dictionaries installed for aspell.
|
|
Is there a simple way of demonstrating the problem this solves with a test? What is the repro case? |
|
It would be rather annoying to replicate. The problem in MIME::Signature is a script that does the equivalent of: This is a broken I don't really think it needs its own test. |
This fixes an issue with _sub_attrs() where it does not localize
$SIG{__DIE__}when it does its eval probe. A fix to Perl 5.37.9 made it so that$SIG{__DIE__}is always called on a compile error, unlike before where it depended on the nature of the error and how many errors.See:
Perl/perl5#20357
https://rt.cpan.org/Ticket/Display.html?id=146848
Perl/perl5#20885
fany/MIME-Signature#3
This also fixes the spelling issues reported in https://rt.cpan.org/Ticket/Display.html?id=146847
It also bumps the version. Once this is released with the _sub_attrs fix, MIME::Signature needs to be updated to depend on the new version. Please coordinate with fany/MIME-Signature#3 and fany/MIME-Signature#4