Skip to content

fix: accept whitespace in file open mode strings #1160

Description

@fglock

Failure

Data::FormValidator::Filters::HTML::Acid (HTML-Acid v0.0.3) fails in CPAN run 20260827-102602-1611 because its pure-Perl dependency Perl6::Slurp opens input using the valid mode string '< '.

PerlOnJava aborts with:

Unknown open() mode '< '

This prevents seven HTML-Acid test programs from completing.

Minimal reproduction

use File::Temp qw(tempfile);

my ($out, $path) = tempfile();
print {$out} "ok";
close $out;

open(my $in, '< ', $path) or die "open: $!\n";
print scalar(<$in>), "\n";

System Perl prints ok. Both the PerlOnJava JVM and interpreter backends abort with Unknown open() mode '< '.

Expected behavior

PerlOnJava should accept Perl-compatible whitespace in a file open mode, treating '< ' equivalently to '<' (while preserving valid layer specifications such as '<:encoding(UTF-8)').

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions