Skip to content

perl: say which perl version is required, once, where it is required - #40

Merged
rjrodger merged 1 commit into
mainfrom
claude/perl-states-its-minimum
Sep 11, 2026
Merged

rjrodger merged 1 commit into
mainfrom
claude/perl-states-its-minimum

Conversation

@rjrodger

Copy link
Copy Markdown
Contributor

On perl 5.34, loading this port reports

Can't locate builtin.pm in @INC (you may need to install the builtin module)
  ... at lib/Voxgig/Plugin/Types.pm line 25.

and then unwinds through a BEGIN failure for every module on the way down — eight of them when the library is loaded through a host SDK — naming each file and never the requirement. builtin is core from 5.36 and does not exist before it, so there is no module to install and the advice is a dead end.

perl/README.md already states the minimum. Nothing in the code did, so the one person who most needs to be told read the least useful message.

A version check now states it in one line, at the one file that depends on it — is_bool is the only way perl can tell a true boolean from the number 1, and jsontype is the whole of this port's answer to having no JSON types:

Voxgig::Plugin::Types requires perl 5.36 or later (this is 5.034001): it uses
builtin::is_bool, the only way perl can tell a true boolean from the number 1.

The runner carries the check too: Corpus.pm loads builtin before it loads the library, so the suite would reach the cryptic error first and the library's own message never.

A BEGIN block rather than use v5.36, which would also switch on that release's feature bundle and change how the rest of each file compiles.

How this surfaced

This library is vendored into @voxgig/sdkgen, whose generated-SDK lane runs the perl secrets suite. On a 5.34 developer machine that lane reported "perl secrets suite failed" — for a toolchain gap, not a defect. sdkgen now skips it visibly (sdkgen#136), and this is the half of the fix that belongs here.

Verification

  • On this machine's 5.34 both files die with the intended sentence instead of the cascade, and the added block parses clean.
  • Additions only — 38 lines, no line removed or changed.
  • make scan-prose ok. CI runs this port on the image's perl 5.38, which is where the change proves it did not break a supported interpreter.

🤖 Generated with Claude Code

https://claude.ai/code/session_01619YNVDt9KUSx25NZA6ADi

On perl 5.34 loading this port reports

    Can't locate builtin.pm in @inc (you may need to install the builtin
    module) ... at lib/Voxgig/Plugin/Types.pm line 25.

and then unwinds through a BEGIN failure for every module on the way down —
eight of them when the library is loaded through a host SDK — naming each
file and never the requirement. `builtin` is core from 5.36 and does not
exist before it, so there is no module to install and the advice is a dead
end.

The README already states the minimum. Nothing in the CODE did, so the one
person who most needs to be told read the least useful message. A version
check now states it in one line, at the one file that depends on it:
`is_bool` is the only way perl can tell a true boolean from the number 1,
and `jsontype` is the whole of this port's answer to having no JSON types.

The runner carries the check too. `Corpus.pm` loads `builtin` BEFORE it
loads the library, so the suite would reach the cryptic error first and the
library's own message never.

A BEGIN block rather than `use v5.36`, which would also switch on that
release's feature bundle and change how the rest of each file compiles.

Verified on this machine's 5.34 — both files now die with the intended
sentence instead of the cascade — and the block itself parses clean. CI runs
this port on the image's perl 5.38, which is where the change proves it did
not break a supported interpreter.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01619YNVDt9KUSx25NZA6ADi
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-11T18:40:27.615730Z 57177d7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@rjrodger
rjrodger merged commit 91c4936 into main Sep 11, 2026
27 of 28 checks passed
@rjrodger
rjrodger deleted the claude/perl-states-its-minimum branch September 11, 2026 18:41
rjrodger added a commit to voxgig/sdkgen that referenced this pull request Sep 11, 2026
A new shared tag across voxgig/struct, voxgig/omni, voxgig/plugin and
voxgig/sekreto, so "what version is this SDK vendoring" keeps one answer
instead of four. Every route re-read at the new tag with `make vendor`;
`make vendor-check` is clean at 70 routes.

TWO CONTENT CHANGES in 791 files. The rest is the provenance header, which
stamps the tag on every vendored file and therefore moves with it:

  plugin/perl   Voxgig::Plugin::Types states its perl 5.36 minimum in code.
                Loading it on 5.34 reported `Can't locate builtin.pm` and
                then unwound through a BEGIN failure for every module on the
                way down — eight of them through a host SDK — naming each
                file and never the requirement. `builtin` is core from 5.36,
                so there was no module to install and the advice was a dead
                end. Fixed upstream (voxgig/plugin#40), which is where the
                file lives; a silent edit to the vendored copy is what the
                manifest guard exists to catch.

  struct        0.3.5 -> 0.3.6 and struct-js 0.1.5 -> 0.1.6, both of which
                are the `// VERSION:` comment and nothing else.

The generated-SDK perl lane now sees the new sentence rather than the bare
`Can't locate`, so UNUSABLE matches both: an SDK generated before this tag
still reports the old one.

Golden manifest regenerated for the moved hashes. 1254 pass / 0 fail /
8 skipped.


Claude-Session: https://claude.ai/code/session_01619YNVDt9KUSx25NZA6ADi

Co-authored-by: Claude Opus 5 (1M context) <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.

1 participant