Interpreter fails Type::Library extends during BEGIN
維護者通常 1 天內回覆
已經有一個關聯 PR 被合併了。
- #1751 來自 @fglock —— 已合併
評估
研究方向
Start with the minimal probe and run it using ./jperl --interpreter probe.pl, then compare its behavior with system Perl and JVM PerlOnJava. Trace interpreter handling of the package @ISA changes made by Type::Library -base before Type::Utils::extends performs its caller isa('Type::Library') check. Done means the probe and Dancer2's Dancer2/Core/Types.pm initialize without the Not a type library error on the interpreter backend.
由索引模型根據 Issue 內容生成。
描述
Summary
Dancer2 cannot load on the interpreter backend because its Dancer2::Core::Types type library fails during BEGIN { extends "Types::Standard" } with Not a type library.
Reproduction
package Probe::Types;
use strict;
use warnings;
use Type::Library -base;
use Type::Utils -all;
BEGIN { extends 'Types::Standard' }
print "loaded\n";
Run with ./jperl --interpreter probe.pl. The JVM backend and system Perl load this successfully; the interpreter reports Not a type library at the extends call. Dancer2's Dancer2/Core/Types.pm uses this same pattern and fails at its corresponding line 10.
Root cause
Type::Utils::extends checks that its caller isa('Type::Library'). Type::Library -base installs Type::Library in the caller package's @ISA during module setup. The interpreter does not expose that inheritance to the subsequent isa check in the same BEGIN block, although the JVM backend does. This prevents Dancer2's type library from initializing, so Dancer2 is not currently usable on the interpreter backend.
Evidence
use Type::Library -basealone succeeds under the interpreter.- The minimal
extends 'Types::Standard'reproducer fails only under the interpreter. - The equivalent probe succeeds under JVM PerlOnJava and system Perl.
- 主要語言
- Perl
- 星號
- 64
- 分支
- 8
- 平均合併
- 5 小時 52 分鐘
- 30 天內合併 PR
- 194
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
fglock/PerlOnJava 的其他 Issue
-
area:runtime documentation enhancement
難度 2/5 1-3 小時 新手友好度 72/100
fglock/PerlOnJava#1579 ·
維護者通常 1 天內回覆
-
area:cpan-port enhancement help wanted
fglock/PerlOnJava#1880 · 2 則留言 ·
維護者通常 1 天內回覆
-
perf: achieve measured 1:1 standard Perl throughput after #1850可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉area:performance enhancement
難度 5/5 一週以上 新手友好度 20/100
fglock/PerlOnJava#1863 · 1 則留言 ·
維護者通常 1 天內回覆
-
area:memory area:performance area:runtime bug
難度 4/5 3-5 天 新手友好度 52/100
fglock/PerlOnJava#1860 · 2 則留言 ·
維護者通常 1 天內回覆
-
area:performance enhancement
難度 5/5 一週以上 新手友好度 25/100
fglock/PerlOnJava#1846 · 1 則留言 ·
維護者通常 1 天內回覆
查看 fglock/PerlOnJava 的全部 Issue
相似的 Issue
-
observablt-ci
難度 2/5 1-3 小時 新手友好度 86/100
elastic/golang-crossbuild#840 ·
維護者通常 1 天內回覆
-
Sync playback crashes repeatedly in a sync group (v9.1.1)可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 2/5 1-3 小時 新手友好度 68/100
LMS-Community/slimserver#1701 · 6 則留言 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 72/100
RotherOSS/otobo#6286 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
-
fix(api): API v3 Product Read ignores request language (lc) for sample products and image URLs可能已有人在做 @muntasir-396 於 5 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 88/100
openfoodfacts/openfoodfacts-server#15042 · 1 則留言 ·
維護者通常 1 天內回覆