Skip to content

Pg critic fixes for older perl#1411

Merged
pstaabp merged 1 commit into
openwebwork:PG-2.21from
drgrice1:pg-critic-fixes-for-older-perl
May 19, 2026
Merged

Pg critic fixes for older perl#1411
pstaabp merged 1 commit into
openwebwork:PG-2.21from
drgrice1:pg-critic-fixes-for-older-perl

Conversation

@drgrice1
Copy link
Copy Markdown
Member

Using //= in signatures is a feature that is not available until version 5.28 of perl. In this case that isn't needed since the walkPGMLTree is never called without that argument.

I am not entirely certain of why the added to_string is needed or why it works with newer versions of perl, but it causes an issue with older perl versions as well.

This fixes issue openwebwork/webwork2#2978.

Using `//=` in signatures is a feature that is not available until
version 5.28 of perl.

I am not entirely certain of why the added `to_string` is needed or why
it works with newer versions of perl, but it causes an issue with older
perl versions as well.

This fixes issue openwebwork/webwork2#2978.
Comment thread lib/WeBWorK/PG/Critic/Utils.pm
@Alex-Jordan
Copy link
Copy Markdown
Contributor

@somiaj If you are good with this, would you go ahead and merge it? I am not easily able to test a lot until this is in, or else I have to separately track having this patch in place.

@somiaj
Copy link
Copy Markdown
Contributor

somiaj commented May 19, 2026

I've only looked at the code and haven't actually had time to test it. I assume it works, but want to test it before merging. Note you could always just git rebase pg-critic-fixes-for-older-perl as a quick way to get this patch when testing. I'll test it in a bit after I'm done doing some school work.

@pstaabp
Copy link
Copy Markdown
Member

pstaabp commented May 19, 2026

Let's merge this. It's only the perl critic code and shouldn't affect the general use.

@pstaabp pstaabp merged commit a34a171 into openwebwork:PG-2.21 May 19, 2026
3 checks passed
@pstaabp
Copy link
Copy Markdown
Member

pstaabp commented May 19, 2026

@Alex-Jordan let us know if this fixes it.

@drgrice1
Copy link
Copy Markdown
Member Author

This does affect general use as issue openwebwork/webwork2#2978 shows.

@Alex-Jordan
Copy link
Copy Markdown
Contributor

Yes, the changes here resolved the issues I was hitting.

@drgrice1 drgrice1 deleted the pg-critic-fixes-for-older-perl branch May 19, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants