Interpreter fails Type::Library extends during BEGIN
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #1751 của @fglock — đã merge
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 58/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Perl
- Star
- 64
- Fork
- 7
- Merge trung bình
- 4 giờ 57 phút
- Pull request đã merge (30 ngày)
- 203
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của fglock/PerlOnJava
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
fglock/PerlOnJava#1651 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
fglock/PerlOnJava#1579 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:cpan-port area:unicode bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
fglock/PerlOnJava#1341 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
fglock/PerlOnJava#1795 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 12/100
fglock/PerlOnJava#1794 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của fglock/PerlOnJava
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
major/MySQLTuner-perl#1007 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
bioconda/bioconda-recipes#70187 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
documentation Needs Triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 93/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Proposed Text EditsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
curl/everything-curl#658 ·