Port autovivification pragma to PerlOnJava

Đang mở
#2,083 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java, perl
Lĩnh vực
backend

Hướng nghiên cứu

Start by reading the autovivification 0.18 import/unimport documentation and the PerlOnJava compiler/runtime paths that handle lexical pragmas on both backends. Then review issues #1958 and #1980 for related core behavior. Done means both backends load the pragma without XS errors, focused tests cover its categories and nested scopes, and Data-Session 1.18's upstream tests pass.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area:cpan-port enhancement

Summary

Port the CPAN autovivification pragma to PerlOnJava so modules that declare use autovivification or no autovivification can load and receive the pragma's documented lexical behavior without relying on XS.

Evidence

The PerlOnJava CPAN run 20261117-153921-75160 tested Data-Session 1.18. Its system-Perl oracle passed all 3 test programs (52 tests). The PerlOnJava run failed all 3 programs before any subtests ran because the dependency autovivification 0.18 calls XSLoader::load; PerlOnJava reported that no Java XS implementation is available. Data::Session and its tests use the pragma lexically, including no autovivification in library files.

autovivification contains XS/C code and cannot currently be loaded by PerlOnJava. A targeted released dependency lookup found 39 unique distributions with a required runtime dependency, 20 of them released in the last five years. Representative dependants include JSON-Schema-Modern, App-Netdisco, OpenAPI-Modern, Spreadsheet-Edit, Test-JSON-Schema-Acceptance, and Mojolicious-Plugin-OpenAPI-Modern.

This request is for a PerlOnJava implementation of the pragma's behavior, not support for compiling arbitrary XS modules.

Porting scope

Implement a Java-backed replacement compatible with autovivification 0.18's documented import/unimport interface and lexical scope. Cover the categories fetch, exists, delete, and store, plus warn and strict modes and their category arguments. Preserve the module's documented default categories and behavior when nested scopes enable or disable the pragma. Determine the right compiler/runtime hook for this lexical behavior and make it work consistently on both JVM and interpreter backends.

The implementation should allow the upstream pure-Perl module entry point to load without attempting to load the XS object when PerlOnJava provides the implementation. Keep standard Perl behavior unchanged.

Acceptance criteria

  • use autovivification and no autovivification load on both PerlOnJava backends without XS load errors.
  • Focused tests cover lexical enable/disable scope and each documented behavior category, including warning/strict modes.
  • The tests pass under system Perl and both PerlOnJava backends.
  • Data-Session 1.18's upstream tests pass under PerlOnJava with the pragma available.
  • Add permanent project-owned regression coverage for the implemented pragma behavior.

Related issues

Issues #1958 and #1980 address specific core autovivification behaviors. They do not provide the lexical pragma or its category controls.

Ngôn ngữ chính
Perl
Star
67
Fork
8
Merge trung bình
5 giờ 12 phút
Pull request đã merge (30 ngày)
131

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của fglock/PerlOnJava

Tất cả issue của fglock/PerlOnJava

Issue tương tự

Thêm issue về Perl

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.