Add XML::LibXML Node localName method alias
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
The method table for the XML::LibXML::Node registration is in XMLLibXML.java, where localname and getLocalName already map to the same implementation. Start there and add localName as a further alias of that entry. The minimal reproduction in the issue, run through ./jperl and ./jperl --interpreter, should print schema; a focused regression test for the camel-case spelling should pass on both backends and under standard Perl.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Perl
- Stars
- 67
- Forks
- 8
- Avg merge
- 4h 36m
- Merged PRs (30d)
- 123
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fglock/PerlOnJava
-
area:cpan-port bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
fglock/PerlOnJava#2153 ·
Maintainers usually reply within 1 day
-
area:cpan-port area:parser bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
fglock/PerlOnJava#2137 ·
Maintainers usually reply within 1 day
-
area:backend area:cpan-port area:runtime bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
fglock/PerlOnJava#2071 ·
Maintainers usually reply within 1 day
-
area:runtime documentation enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
fglock/PerlOnJava#1579 ·
Maintainers usually reply within 1 day
-
area:parser area:warnings bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
fglock/PerlOnJava#2165 ·
Maintainers usually reply within 1 day
All issues in fglock/PerlOnJava
Similar issues
-
Dev-output directory preparation accepts file-valued lib/include paths and fails on dangling linksOpenteam-cli
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
Difficulty 1/5 Under an hour Newbie friendliness 93/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
inverse-inc/packetfence#9728 ·
Maintainers usually reply within 1 day
-
fix(char-create): show the real reason a character is refusedPossibly taken @baphomello claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day