Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Data::Dumper::Simple 0.11 fails because Filter::Simple source filtering is not applied correctly

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

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
52/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
perl
领域
compilers

调研方向

首先运行 jperl -Ilib t/10dump.t 和对应的 --interpreter 命令,然后比较失败的 upstream 测试 t/20import.t、t/30autowarn.t 和 t/40noparens.t。阅读 use 语句之后的 source-filter 注册和应用,尤其是 Filter::Util::Call/Filter::Simple 集成以及剩余源代码的重新标记化。完成的标准是四个测试在两个后端上都通过,并且有一个聚焦的项目自有回归测试覆盖该 filter 的行为。

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

描述

bug

Summary

Data::Dumper::Simple v0.11 fails its upstream test suite under PerlOnJava because its Filter::Simple source filter does not transform calls made after the module is imported.

This was observed in CPAN random tester run 20260913-205737-64746.

Reproduction

The upstream test suite passes under system Perl:

  • 4 substantive test programs passed
  • 35 tests passed in total
  • The optional POD tests were skipped because their optional dependencies/files were unavailable

The same upstream tests fail under both PerlOnJava backends:

  • JVM backend: t/10dump.t, t/20import.t, t/30autowarn.t, and t/40noparens.t fail
  • Interpreter backend: the same four tests fail

Representative commands:

jperl -Ilib t/10dump.t
jperl --interpreter -Ilib t/10dump.t

Observed failures

  • t/10dump.t: Undefined subroutine &main::Dumper
  • t/20import.t: Undefined subroutine &main::frobnitz
  • t/30autowarn.t: Undefined subroutine &main::Dumper
  • t/40noparens.t: Global symbol "$hash" requires explicit package name

Each failing test reports that it ran only its initial use_ok test before aborting.

Expected behavior

use Data::Dumper::Simple installs a Filter::Simple source filter. Calls such as:

Dumper($scalar, @array, %hash)

should be rewritten at compile time to an equivalent Data::Dumper->Dump call. The as => 'frobnitz' and autowarn options, as well as no-parentheses syntax, should work as they do under system Perl.

Initial diagnosis

The distribution is pure Perl and has no XS, native-library, display, network-service, or other platform prerequisite involved in these tests. The failures occur identically on the JVM and interpreter backends, indicating a shared frontend/source-filter compatibility problem rather than a backend-specific runtime issue.

The module uses Filter::Simple with FILTER_ONLY executable. The missing generated subroutine calls indicate that the filter is either not being applied to the remaining source after the import or its transformed source is not being correctly re-tokenized/compiled. The strict-vars error in t/40noparens.t is consistent with the no-parentheses source-filter path failing to produce the expected transformed expression.

Relevant implementation areas include source-filter registration and application after use statements, especially the Filter::Util::Call/Filter::Simple integration and remaining-source re-tokenization in the frontend.

Acceptance criteria

  • All four substantive Data::Dumper::Simple test programs pass on the JVM backend.
  • The same tests pass on the interpreter backend.
  • as => 'frobnitz', autowarn, and no-parentheses calls are covered.
  • Add a project-owned focused regression test for the underlying source-filter behavior; retain the upstream distribution tests as integration coverage.

Environment

  • CPAN random tester run: 20260913-205737-64746
  • Distribution: Data-Dumper-Simple-0.11
  • Affected backends: JVM and interpreter
  • System Perl: full substantive suite passes
主要语言
Perl
星标
64
派生
6
平均合并
5 小时 38 分钟
30 天内合并 PR
170

贡献指南

打开贡献指南

从这里开始

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

fglock/PerlOnJava 的其他 Issue

查看 fglock/PerlOnJava 的全部 Issue

相似的 Issue

更多 Perl Issue

把新 issue 发到你的邮箱

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