Skip to content

Conversation

@HaraldJoerg
Copy link

I am very much interested in named parameters and only yesterday
started a new project... which will now use the signature-named-parameters branch, because of why not.

One of my first quick attempts hit a weird way where it goes wrong.

This signature lacks a comma between the parameters:

sub core (:$id :$type) {
    ...
}

Running it through the Perl interpreter which understands named parameter segfaults.
I found equivalent tests for positional parameters in t/op/signatures.t. Maybe the different path to parse named parameters should get its own test?

The error message in the test is just a guess and might need adjustment...

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

leonerd and others added 2 commits August 28, 2025 11:27
t/op/signatures.t (t096_named): A syntax error with named parameters
A very similar test with positional parameters is in t096, I *guess*
the same error message should appear for named parameters
@leonerd leonerd force-pushed the signature-named-parameters branch 3 times, most recently from dcdbe8c to 52ccfb0 Compare September 18, 2025 18:04
@leonerd leonerd force-pushed the signature-named-parameters branch 6 times, most recently from a009c2c to 83373f0 Compare September 29, 2025 13:55
@leonerd leonerd force-pushed the signature-named-parameters branch from 83373f0 to 7d0b61a Compare October 6, 2025 21:08
@leonerd leonerd force-pushed the signature-named-parameters branch 2 times, most recently from 922a8c8 to eda3ef8 Compare October 21, 2025 14:13
@leonerd
Copy link
Owner

leonerd commented Oct 21, 2025

A useful cornercase to test. I've added this and a fix for it to my branch.

@leonerd leonerd force-pushed the signature-named-parameters branch 9 times, most recently from e0d65bb to 7676a6b Compare October 25, 2025 12:17
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.

2 participants