Implement B::cstring for PerlOnJava regex stringification
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with src/main/perl/lib/B.pm and compare B::cstring behavior with system Perl for the string and regexp cases listed in the acceptance criteria. Then add focused regression coverage, validate it with standard Perl and both PerlOnJava backends, and run all eight Regexp-Lexer 0.05 test files; done means the behavior is compatible and those tests pass.
索引モデルが issue の本文から書いたものです。
説明
Summary
Implement Perl-compatible B::cstring support in PerlOnJava's B module. Regexp::Lexer 0.05 uses this core B helper to turn a compiled regexp into a quoted string before tokenizing it. PerlOnJava's B.pm is a partial stub and does not define cstring, so the module loads but its tokenizer fails at runtime.
This is related to the broader B compatibility exploration in #1291, but is a standalone pure-Perl API gap: the reproducer does not require B::Utils or XS.
Reproducer
use B;
my $quoted = B::cstring(qr/foo/i);
print "$quoted\n";
With system Perl 5.34.1, this prints:
"(?^i:foo)"
On PerlOnJava at 168259c9e, both the JVM and interpreter backends exit 255 with:
Undefined subroutine &B::cstring called at -e line 1.
CPAN evidence
- Distribution:
Regexp-Lexer0.05 (MOZNION/Regexp-Lexer-0.05) - Archived random tester run:
20261118-104825-43075 - Failing files:
t/01_basic.t,t/03_escaped_N.t,t/04_double_quote.t,t/05_empty.t, and both tests undert/10_with_not_meta_newline/ - All six runtime failures terminate in
Regexp::Lexer::tokenizeat itsB::cstring($re)call.t/00_compile.tandt/02_exceptional.tpass. - The full upstream suite passes on system Perl 5.34.1: 8 files, 10 tests, recursive
provewith the distribution'slibdirectory on@INC.
Root cause
src/main/perl/lib/B.pm implements a minimal subset of Perl's B module, but has no cstring function. The repository's XString::cstring helper quotes a supplied string; it does not implement the B::cstring interface or itself obtain the Perl string form of a regexp. The upstream module relies on B::cstring's quoted regexp string, including modifier representation and escaping, so a plain B::perlstring call is not automatically a compatible substitute.
Acceptance criteria
- Provide
B::cstringbehavior compatible with system Perl for strings and compiled regexps, including escaped metacharacters, quotes, backslashes, modifiers, and Unicode/byte strings as applicable. - Add focused project regression coverage validated first with standard Perl, then on both PerlOnJava backends.
- Re-run all eight
Regexp-Lexer0.05 test files and confirm the CPAN failure is resolved.
- 主要言語
- Perl
- スター
- 67
- フォーク
- 8
- 平均マージ
- 5時間 12分
- マージ済み PR(30日)
- 131
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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:cpan-port bug
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
fglock/PerlOnJava#2157 ·
メンテナーはふだん 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 日以内に返信