-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
disabling bareword filehandles erroneously forbids package method calls #19704
Comments
|
Here are some tests that demonstrate the issue: diff --git a/t/lib/feature/bareword_filehandles b/t/lib/feature/bareword_filehandles
index a3604770d4..fba6a59927 100644
--- a/t/lib/feature/bareword_filehandles
+++ b/t/lib/feature/bareword_filehandles
@@ -496,3 +496,15 @@ say foo;
-x foo();
-x foo;
EXPECT
+########
+# NAME method calls
+use feature "say";
+no feature "bareword_filehandles";
+sub foo {}
+print main->foo();
+print main->foo;
+say main->foo();
+say main->foo;
+-x main->foo();
+-x main->foo;
+EXPECTResult: |
|
@tonycoz any ideas? |
|
#19426 may be related |
|
Oof. We should turn bareword filehandles back on in the bundle for sure, right? I can't see why we wouldn't, at this point. |
|
Even if a bugfix turned up right now and was trivial and obviously-correct, I think we'd still feel rather nervous about deploying it directly for an RC1. It feels like this feature hasn't really had enough stress-testing yet, if this much of a showstopper turns up quite this late. I agree with @rjbs - we should back it out and reënable it in the prevailing feature bundle. |
|
I've begun a PR here - #19705 |
Description
When the
bareworld_filehandlesfeature is disabled (e.g. underuse v5.35;), package method calls are also forbidden where a bareword filehandle would be.Steps to Reproduce
It seems to be interpreting the bareword
constop under theentersubas a bareword filehandle, even though that's actually the argument tomethod_named:Expected behavior
Same as with the feature enabled:
Perl configuration
The text was updated successfully, but these errors were encountered: