Summary
Port Mojolicious 9.49 to the current PerlOnJava runtime. The historical CPAN report classifies the core distribution as SKIP, but it now installs and runs deeply enough that the remaining work is actionable and should be tracked as a high-priority compatibility effort.
This is strategically important: the CPAN dependency-priority tool reports 876 reverse runtime dependants, including 195 recent dependants. Mojolicious is also pure Perl, so the failures point to reusable PerlOnJava runtime fixes rather than an XS port.
Baseline
System Perl, with local loopback sockets available and the inherited NO_COLOR environment override removed:
All tests successful.
Files=109, Tests=4184
Result: PASS
PerlOnJava 5.44.1:
timeout 900 ./jcpan -t Mojolicious
Mojolicious installs and executes a substantial portion of the suite, but eventually hangs and is terminated by the 900-second bound. This should therefore replace the stale blanket SKIP classification with an actionable FAIL/TIMEOUT until the suite is stable.
Current failure clusters
The observed failures are concentrated in a few runtime areas rather than independent framework defects:
Filehandle and selected-handle state
Bad file descriptor while reading templates and log files- empty destination paths in
Mojo::Asset::Memory and file-copy operations - representative tests:
t/mojo/file.t, t/mojo/log.t, t/mojo/template.t
Listening sockets and poll integration
Can't create listen socket: Input/output error- affects daemon, IOLoop, file-download, user-agent, and application tests
- representative tests:
t/mojo/daemon.t, t/mojo/ioloop.t, t/mojo/reactor_poll.t
Reactor and promise lifecycle
Can't call method "next_tick" on an undefined value in Mojo::Promiseis_running called on an undefined reactor- timer failure followed by non-termination
- representative tests:
t/mojo/promise.t, t/mojo/ioloop.t, application tests using Test::Mojo
HTTP gzip decoding
- compressed response body remains encoded or becomes empty
Content-Encoding and compressed Content-Length are retained- representative test:
t/mojo/response.t
Secondary diagnostic differences
- template/loader exception text and line context differ from system Perl
Many foundational tests already pass, including parameters, paths, headers, PSGI, proxy handling, request CGI support, roles, signatures, and SSE. Developer-only TLS, prefork, subprocess, and online tests remain skipped by upstream defaults.
Proposed staged implementation
- Make synchronous Mojolicious Lite and PSGI applications reliable, using
Mojo::Server::PSGI with the existing Netty PSGI handler where practical. - Fix filehandle replacement/restoration and selected-handle behavior, with focused project-owned regression tests.
- Fix loopback listening sockets and
IO::Poll integration. - Stabilize IOLoop timers and promise scheduling; add a bounded reproducer for the current hang.
- Fix HTTP gzip response decoding.
- Extend coverage to the user agent and WebSockets.
- Document fork/prefork features as unsupported where they fundamentally require Perl
fork.
The existing dev/modules/mojo_ioloop.md investigation should be updated rather than replaced. It documents earlier progress and root-cause candidates, including selected-handle restoration, reactor corruption, template diagnostics, and gzip handling.
Acceptance criteria
Summary
Port Mojolicious 9.49 to the current PerlOnJava runtime. The historical CPAN report classifies the core distribution as
SKIP, but it now installs and runs deeply enough that the remaining work is actionable and should be tracked as a high-priority compatibility effort.This is strategically important: the CPAN dependency-priority tool reports 876 reverse runtime dependants, including 195 recent dependants. Mojolicious is also pure Perl, so the failures point to reusable PerlOnJava runtime fixes rather than an XS port.
Baseline
System Perl, with local loopback sockets available and the inherited
NO_COLORenvironment override removed:PerlOnJava 5.44.1:
Mojolicious installs and executes a substantial portion of the suite, but eventually hangs and is terminated by the 900-second bound. This should therefore replace the stale blanket
SKIPclassification with an actionableFAIL/TIMEOUTuntil the suite is stable.Current failure clusters
The observed failures are concentrated in a few runtime areas rather than independent framework defects:
Filehandle and selected-handle state
Bad file descriptorwhile reading templates and log filesMojo::Asset::Memoryand file-copy operationst/mojo/file.t,t/mojo/log.t,t/mojo/template.tListening sockets and poll integration
Can't create listen socket: Input/output errort/mojo/daemon.t,t/mojo/ioloop.t,t/mojo/reactor_poll.tReactor and promise lifecycle
Can't call method "next_tick" on an undefined valueinMojo::Promiseis_runningcalled on an undefined reactort/mojo/promise.t,t/mojo/ioloop.t, application tests usingTest::MojoHTTP gzip decoding
Content-Encodingand compressedContent-Lengthare retainedt/mojo/response.tSecondary diagnostic differences
Many foundational tests already pass, including parameters, paths, headers, PSGI, proxy handling, request CGI support, roles, signatures, and SSE. Developer-only TLS, prefork, subprocess, and online tests remain skipped by upstream defaults.
Proposed staged implementation
Mojo::Server::PSGIwith the existing Netty PSGI handler where practical.IO::Pollintegration.fork.The existing
dev/modules/mojo_ioloop.mdinvestigation should be updated rather than replaced. It documents earlier progress and root-cause candidates, including selected-handle restoration, reactor corruption, template diagnostics, and gzip handling.Acceptance criteria
./jcpan -t Mojoliciouscompletes without hanging.dev/modules/mojo_ioloop.mdprogress tracking and the CPAN compatibility classification.