Add XML::LibXML Node localName method alias
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
XML::LibXML::Node 註冊的方法表位於 XMLLibXML.java 中,其中 localname 與 getLocalName 已經對應到同一個實作。請從那裡開始,並將 localName 新增為該項目的另一個別名。透過 ./jperl 與 ./jperl --interpreter 執行 issue 中的最小重現範例,應輸出 schema;針對駝峰寫法的專門回歸測試應在兩種後端以及標準 Perl 下通過。
由索引模型根據 Issue 內容生成。
描述
Summary
PerlOnJava's XML::LibXML::Node method table does not expose the camel-case localName method. A caller using this public method gets a method-not-found error, even though the XML::LibXML compatibility implementation provides the equivalent DOM operation as localname.
Minimal reproduction
use XML::LibXML;
my $doc = XML::LibXML->load_xml(string => '<schema/>');
my $root = $doc->documentElement;
print $root->localName, "\n";
Expected output:
schema
Observed on both PerlOnJava backends:
Can't locate object method "localName" via package "XML::LibXML::Element"
System Perl with XML::LibXML prints schema.
Root cause
XML::Compile 1.64 calls $this->localName in XML/Compile/Schema.pm while checking the root schema element. In XMLLibXML.java, the XML::LibXML::Node registration table maps localname and getLocalName to the localname implementation, but does not register the exact, case-sensitive method name localName. PerlOnJava's package method dispatch therefore cannot resolve the call. The issue reproduces directly without Data::DublinCore and affects both JVM and interpreter execution.
A likely fix is to register localName as another alias of the existing localname implementation, then add focused coverage for the camel-case API spelling on both backends.
CPAN evidence
- Distribution:
Data-DublinCore1.00 - Archived CPAN run:
20261121-154046-78188 - PerlOnJava failure:
t/20rdf.taborts before running its 8 assertions;t/01use.tandt/99pod.tpass. - System-Perl oracle: all 3 target test files pass, 14 tests total, using the run's installed prerequisites.
- Focused minimal reproduction:
./jperland./jperl --interpreterboth fail; system Perl succeeds. - Environment: macOS 15.6 arm64, OpenJDK 24.0.2; the oracle log reports Perl 5.42.2. The separate focused system-Perl check used Perl 5.34.1.
Acceptance criteria
XML::LibXML::Element->localNameresolves to the same local-name value as the existinglocalnamemethod.- Add a project-owned focused regression test for the camel-case spelling.
- The focused test passes on the JVM and interpreter backends and under standard Perl.
- The
Data-DublinCore1.00t/20rdf.ttest passes with its prerequisites installed.
- 主要語言
- Perl
- 星號
- 67
- 分支
- 8
- 平均合併
- 4 小時 36 分鐘
- 30 天內合併 PR
- 123
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
fglock/PerlOnJava 的其他 Issue
-
area:cpan-port bug
難度 2/5 1-3 小時 新手友好度 70/100
fglock/PerlOnJava#2153 ·
維護者通常 1 天內回覆
-
area:cpan-port area:parser bug
難度 2/5 1-3 小時 新手友好度 68/100
fglock/PerlOnJava#2137 ·
維護者通常 1 天內回覆
-
area:backend area:cpan-port area:runtime bug
難度 2/5 1-3 小時 新手友好度 76/100
fglock/PerlOnJava#2071 ·
維護者通常 1 天內回覆
-
area:runtime documentation enhancement
難度 2/5 1-3 小時 新手友好度 72/100
fglock/PerlOnJava#1579 ·
維護者通常 1 天內回覆
-
area:parser area:warnings bug
難度 4/5 3-5 天 新手友好度 35/100
fglock/PerlOnJava#2165 ·
維護者通常 1 天內回覆
查看 fglock/PerlOnJava 的全部 Issue
相似的 Issue
-
Dev-output directory preparation accepts file-valued lib/include paths and fails on dangling links未關閉team-cli
難度 2/5 1-3 小時 新手友好度 70/100
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 66/100
-
難度 1/5 1 小時以內 新手友好度 93/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 73/100
inverse-inc/packetfence#9728 ·
維護者通常 1 天內回覆
-
fix(char-create): show the real reason a character is refused可能已有人在做 @baphomello 於 1 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 84/100
維護者通常 1 天內回覆