Skip to content

Fix CPAN random module compatibility issues#864

Merged
fglock merged 2 commits into
masterfrom
fix/cpan-random-modules-2
Jun 18, 2026
Merged

Fix CPAN random module compatibility issues#864
fglock merged 2 commits into
masterfrom
fix/cpan-random-modules-2

Conversation

@fglock

@fglock fglock commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • fix parser/runtime parity issues found by cpan_random_tester across ExtUtils::Helpers, Search::Dict, File::Globstar, Path::Dispatcher::Declarative, and Carp::Assert::More
  • add caller()[5] context tracking and blessed CODE isa("CODE") support
  • add AnyEvent distroprefs helper to avoid the Canary prompt and skip unsupported fork/event-loop upstream tests

Verification

  • make
  • ./jcpan -t ExtUtils::Helpers
  • ./jcpan -t Search::Dict
  • ./jcpan -t File::Globstar
  • ./jcpan -t Any::Moose
  • ./jcpan -t Path::Dispatcher::Declarative
  • ./jcpan -t Carp::Assert::More
  • ./jcpan -t AnyEvent
  • ./jcpan -t Test::Class

fglock and others added 2 commits June 18, 2026 18:39
Fix several runtime and parser parity issues surfaced by cpan_random_tester:
- accept perl shebangs with switches for -x extraction
- propagate BEGIN feature imports back to the caller scope
- preserve parsed CODE refs for defined(&name)
- handle zero-length global substitutions with same-position retry
- support scalar refs to globs as IO method invocants
- expose caller()[5] wantarray context and blessed CODE isa("CODE")
- add AnyEvent distroprefs for unsupported upstream event-loop/fork tests

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Fix regressions from the CPAN compatibility changes:
- keep s///g matcher regions from creating artificial ^/$ anchors
- allow lookaround assertions to inspect across substitution region bounds
- keep synthetic zero-length retry matching opaque so nullable s///g still consumes correctly
- apply shebang switches discovered by -x extraction and reject -x over -e fragments

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
@fglock fglock merged commit 23cf65e into master Jun 18, 2026
2 checks passed
@fglock fglock deleted the fix/cpan-random-modules-2 branch June 18, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant