Skip to content

Conversation

@mauke
Copy link
Contributor

@mauke mauke commented Mar 16, 2025

There is no point in using a separate format string if the whole error message is written right next to it. Not only does this change lead to simpler code (passing one argument instead of two), it also exposes more error messages to t/porting/diag.t, which relies on croak's first argument to supply the message template.

Also make an equivalent change to S_open_script, which passes a constant string in the form of an err variable that is not used anywhere else. (It used to be, but that code was deleted in commit 5bc7d00.)


  • This set of changes does not require a perldelta entry.

There is no point in using a separate format string if the whole error
message is written right next to it. Not only does this change lead to
simpler code (passing one argument instead of two), it also exposes more
error messages to t/porting/diag.t, which relies on croak's first
argument to supply the message template.

Also make an equivalent change to S_open_script, which passes a constant
string in the form of an err variable that is not used anywhere else.
(It used to be, but that code was deleted in commit 5bc7d00.)
@mauke mauke merged commit 71d1d45 into Perl:blead Mar 17, 2025
34 checks passed
@mauke mauke deleted the croak-concretely branch March 17, 2025 07:13
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.

3 participants