Short-circuit expressions leak list context through scalar prototypes
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Start with the prototype parsing path that reparses parenthesized low-precedence expressions, then run the focused regression prototype_parenthesized_and_argument.t on both JVM and interpreter backends. Compare the argument count and values with system Perl’s scalar-prototype behavior; done means the regression and the two upstream t/use.t assertions pass on both backends.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Short-circuit expressions passed to scalar-prototype arguments can retain list context in PerlOnJava. This causes the upstream GMail-Checker-1.04 test t/use.t to fail both assertions under Test::ok ($;$$).
Reproducer
use strict;
use warnings;
use Test;
BEGIN { plan tests => 1 }
our @args;
sub capture ($;$$) { @args = @_ }
my $object = bless {}, 'Example';
capture (defined($object) and (ref $object, 'new() is ok'));
print scalar(@args), "|", join('|', @args), "\n";
System Perl treats the parenthesized short-circuit expression as one scalar-prototype argument. PerlOnJava previously passed two values, so the and expression's list-valued right side escaped into the call argument list.
Evidence
- CPAN distribution:
GMail-Checker1.04, CPAN run20261026-163826-15395. - System Perl 5.42.2 on macOS: upstream
t/use.tpasses (2/2). - PerlOnJava 5.44.1 on the JVM and interpreter backends: upstream
t/use.tfailed (0/2) before the fix. - The focused regression
prototype_parenthesized_and_argument.tfailed on the JVM before the fix and passes on both backends after it. - The distribution is pure Perl and needs no Gmail credentials for these two tests.
The fix preserves scalar context when prototype parsing reparses a parenthesized low-precedence expression.
- Ngôn ngữ chính
- Perl
- Star
- 65
- Fork
- 8
- Merge trung bình
- 6 giờ 6 phút
- Pull request đã merge (30 ngày)
- 185
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
-
area:runtime documentation enhancement
Độ 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
-
CPAN: Lingua-ZH-Romanize-Pinyin build skips generated dictionaries and rejects $] test guardCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởarea:cpan-port area:parser bug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
fglock/PerlOnJava#1919 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:performance enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
fglock/PerlOnJava#1911 · 1 bình luận ·
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 35/100
fglock/PerlOnJava#1885 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Port Devel::Size for PerlOnJavaĐang mởarea:cpan-port enhancement help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
fglock/PerlOnJava#1880 · 2 bình luận ·
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ự
-
Type: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
inverse-inc/packetfence#9605 ·
Maintainer thường phản hồi trong vòng 10 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
RotherOSS/otobo#6344 · 1 bình luận ·
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 85/100
darold/pgFormatter#426 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 77/100
libwww-perl/URI#219 ·