Parser rejects our self-reference in its initializer under strict vars
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Start by tracing how our declarations are handled and how strict 'vars' resolves initializer references in both the JVM and interpreter backends. Reproduce with our $V = $V = 119; under strict vars and compare with system Perl. Done when both backends compile the case and leave $V equal to 119.
由索引模型根據 Issue 內容生成。
描述
Summary
The parser rejects a valid our declaration when its initializer reads the variable being declared under strict 'vars'. This breaks CPAN distribution Text-Template 1.61: t/delimiters.t stops at compile time with Global symbol "$V" requires explicit package name, before running its assertions. System Perl 5.42.2 accepts the source, and the complete upstream distribution suite passes there (22 files, 184 tests). Both PerlOnJava backends reject it.
Root cause
The declaration's initializer is resolved before the our variable is entered into the current lexical symbol table. Perl makes the our alias visible in the declaration's initializer, so the self-assignment in this valid initializer must resolve to the package variable. The package glob being materialized during declaration handling is not sufficient: strict-variable resolution uses the lexical symbol table and reports the RHS $V as undeclared.
This was independently reproduced with the one-line case in the comment. It fails under both the JVM and interpreter backends and succeeds under system Perl. The failure is included in archived CPAN run 20261104-151051-20617.
Expected behavior
our $V = $V = 119; compiles under use strict and leaves $V equal to 119, as it does in system Perl.
- 主要語言
- Perl
- 星號
- 65
- 分支
- 8
- 平均合併
- 5 小時 54 分鐘
- 30 天內合併 PR
- 184
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
fglock/PerlOnJava 的其他 Issue
-
area:runtime documentation enhancement
難度 2/5 1-3 小時 新手友好度 72/100
fglock/PerlOnJava#1579 ·
維護者通常 1 天內回覆
-
area:backend bug
難度 4/5 3-5 天 新手友好度 55/100
fglock/PerlOnJava#1981 · 1 則留言 ·
維護者通常 1 天內回覆
-
area:runtime bug
難度 4/5 3-5 天 新手友好度 57/100
fglock/PerlOnJava#1980 · 1 則留言 ·
維護者通常 1 天內回覆
-
perf: continue eval STRING optimization work (follow-up to #1940)可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 4/5 3-5 天 新手友好度 52/100
fglock/PerlOnJava#1961 · 1 則留言 ·
維護者通常 1 天內回覆
-
Fix Java TLS socket reads for chunked HTTPS response bodies可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉area:io bug
難度 4/5 3-5 天 新手友好度 56/100
fglock/PerlOnJava#1957 · 6 則留言 ·
維護者通常 1 天內回覆
查看 fglock/PerlOnJava 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
-
ai-driven-fuzzing bug claude Minor
難度 2/5 1-3 小時 新手友好度 72/100
linagora/lemonldap-ng-plugins#170 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
libwww-perl/HTTP-Message#236 ·
-
1.severity: security
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆
-
wave-followup
難度 2/5 1-3 小時 新手友好度 74/100