Port Scalar::Util::Numeric XS module

未关闭
#1,962 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
java, perl
领域
backend, testing

调研方向

Start by reading the PerlOnJava XS loading path and the upstream Scalar::Util::Numeric 0.40 wrapper and XS implementation; the issue does not name project files or tests. Compare each exported predicate's behavior with system Perl, then add project-owned API regression coverage and run the Data-TableData-Object 0.116 suite on both backends. Done means the module loads without native XS and matches the stated classification and return conventions.

由索引模型根据 Issue 内容生成。

描述

area:cpan-port bug

Summary

Add PerlOnJava support for Scalar::Util::Numeric 0.40. This CPAN module currently fails to load because it is implemented in XS and PerlOnJava has no Java XS implementation for it.

Evidence

In CPAN random tester run 20261103-123832-91742, distribution Data-TableData-Object 0.116 passed its complete upstream suite under system Perl 5.42.2 (8 files, 102 tests). Under PerlOnJava, 5 of 8 test programs failed: the compile checks and the aoaos, aohos, aos, and hash tests. All failures stem from loading Scalar::Util::Numeric: Can't load loadable object ... no Java XS implementation available.

The MetaCPAN reverse dependency page reports 56 released dependent distributions, including 17 released on or after 2023-11-04 (the three-year recency window used by the project’s CPAN port-priority report). Recent examples include App-CSVUtils, Tk-AppWindow, App-pause, Bio-Gonzales, and Data-TableData-Object.

References:

Porting scope

The 0.40 Perl wrapper loads XS directly. The XS implementation calls Perl's grok_number and exposes numeric classification through isnum, isint, isuv, isbig, isfloat, isneg, isinf, and isnan. The module also contains Windows-specific recognition for 1.#INF, -1.#INF, and 1.#IND spellings. Provide compatible behavior on PerlOnJava, either through a pure-Perl-compatible provider or a Java implementation, without requiring native XS loading.

Acceptance criteria

  • use Scalar::Util::Numeric and all exported functions work on the JVM and interpreter backends without an XS load failure.
  • Classification results match the upstream module/system Perl for ordinary numbers, integer and UV boundaries, large values, decimal/exponent forms, signs, infinities, NaN, undefined values, and stringified or overloaded values where supported by the module.
  • Preserve the documented return conventions, including isint returning -1, 1, or 0 and the boolean return values of the other predicates.
  • Add project-owned regression coverage for the public API and validate expected behavior against system Perl.
  • Re-run the Data-TableData-Object 0.116 upstream suite on both PerlOnJava backends.
主要语言
Perl
星标
65
派生
8
平均合并
5 小时 45 分钟
30 天内合并 PR
184

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

fglock/PerlOnJava 的其他 Issue

查看 fglock/PerlOnJava 的全部 Issue

相似的 Issue

更多 Perl Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。