Implement B::cstring for PerlOnJava regex stringification
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 48/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Perl
- Étoiles
- 67
- Forks
- 8
- Merge moyen
- 5 h 12 min
- PR mergées (30 j)
- 131
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de fglock/PerlOnJava
-
area:cpan-port bug
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
fglock/PerlOnJava#2153 ·
Les mainteneurs répondent en général sous 1 jour
-
area:cpan-port area:parser bug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
fglock/PerlOnJava#2137 ·
Les mainteneurs répondent en général sous 1 jour
-
area:backend area:cpan-port area:runtime bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
fglock/PerlOnJava#2071 ·
Les mainteneurs répondent en général sous 1 jour
-
area:runtime documentation enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
fglock/PerlOnJava#1579 ·
Les mainteneurs répondent en général sous 1 jour
-
area:cpan-port bug
Difficulté 3/5 1-2 jours Accessibilité débutants 62/100
fglock/PerlOnJava#2157 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de fglock/PerlOnJava
Issues similaires
-
Dev-output directory preparation accepts file-valued lib/include paths and fails on dangling linksOuverteteam-cli
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 93/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
inverse-inc/packetfence#9728 ·
Les mainteneurs répondent en général sous 1 jour
-
fix(char-create): show the real reason a character is refusedPeut-être pris @baphomello l’a pris il y a 1 jour. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour