Skip to content

fix: bump minimum Perl to 5.008, remove IO::String fallback#362

Draft
toddr-bot wants to merge 2 commits into
masterfrom
koan.toddr.bot/fix-issue-268
Draft

fix: bump minimum Perl to 5.008, remove IO::String fallback#362
toddr-bot wants to merge 2 commits into
masterfrom
koan.toddr.bot/fix-issue-268

Conversation

@toddr-bot

@toddr-bot toddr-bot commented Apr 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Bumps the declared minimum Perl version from 5.006 to 5.008 and removes the IO::String compatibility code from PPI::Token::Data. The module uses three-arg open with a scalar ref (in-memory filehandle), which is a 5.008 feature. Previously this was worked around with an IO::String fallback and a Test::MinimumVersion exclusion.

Fixes #268

Changes

  • use 5.008 in PPI.pm and PPI::XSAccessor.pm (was use 5.006)
  • Removed IO::String conditional loading and fallback code path from PPI::Token::Data
  • Removed IO::String dynamic prereq from dist.ini
  • Removed Token/Data.pm exclusion from xt/author/pmv.t
  • Removed IO::String special case from t/19_selftesting.t
  • Simplified t/13_data.t handle type assertion

Test plan

  • Full test suite passes (69 files, 53081 tests)
  • t/13_data.t now unconditionally asserts handle is a GLOB
  • xt/author/pmv.t no longer excludes Token/Data.pm from minimum version checks

Generated by Kōan /fix


Quality Report

Changes: 7 files changed, 9 insertions(+), 26 deletions(-)

Code scan: clean

Tests: skipped

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

toddr-bot and others added 2 commits April 26, 2026 19:47
Remove Token/Data.pm exclusion from xt/author/pmv.t so it gets
checked by Test::MinimumVersion. Add a TODO test verifying
IO::String is not loaded when running on 5.008+.

These tests expose the issue: Token/Data.pm uses scalar-ref open
(a 5.008 feature) but the declared minimum version is 5.006.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PPI::Token::Data uses three-arg open with a scalar ref (in-memory
filehandle), which requires Perl 5.008. The declared minimum was
5.006 with an IO::String fallback for older perls and a pmv.t
exclusion to suppress the Test::MinimumVersion failure.

Since Perl 5.6 reached end of life in 2003, bump the minimum to
5.008 and remove all the compatibility scaffolding:

- use 5.008 in PPI.pm and PPI::XSAccessor.pm
- Remove IO::String conditional loading from Token/Data.pm
- Remove IO::String dynamic prereq from dist.ini
- Remove Token/Data.pm exclusion from xt/author/pmv.t
- Remove IO::String special case from t/19_selftesting.t
- Simplify t/13_data.t handle type check

Fixes #268

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Maybe bump minimum Perl version to 5.008?

1 participant