Skip to content

Conversation

zb226
Copy link

@zb226 zb226 commented Oct 4, 2025

This PR adds a todo-test for #16665 where postfix dereferencing fails to work as documented:

Postfix dereference should work in all circumstances where block (circumfix) dereference worked, and should be entirely equivalent.

This snippet using the circumfix syntax prints 123:

sub f {[1,2,3]}; print sort @​{f()}

However, the postfix variant produces no output:

sub f {[1,2,3]}; print sort f()->@*;

With warnings enabled, the postfix variant emits Use of uninitialized value in array dereference.


There are three related issues linked: #16548, #15733, #2305.
I'm wondering if this is the right issue to todo-test, or the others should even get separate tests.


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

@jkeenan
Copy link
Contributor

jkeenan commented Oct 6, 2025

This PR adds a todo-test for #16665 where postfix dereferencing fails to work as documented.

Can you please cite the place in the Perl documentation that specifies how postfix dereferencing works, and then explain the discrepancy between what you got and what you expected? Thanks.

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