Bundled Modules Reference

May 27, 2026 · View on GitHub

PerlOnJava ships with 150+ modules built into the JAR — no installation needed. Additional pure-Perl modules can be installed from CPAN with jcpan.

This page lists every bundled module, grouped by category, and documents modules that have external requirements or special instructions.


Modules with External Requirements

Some bundled modules need external software to be installed separately.

DBI — Database Access

DBI is bundled with a JDBC backend. SQLite works out of the box (the driver is included in the JAR). Other databases require adding a JDBC driver.

use DBI;
my $dbh = DBI->connect("dbi:SQLite:dbname=:memory:", "", "");

For MySQL, PostgreSQL, Oracle, BigQuery, and other databases, see the full guide: Database Access Guide.

DatabaseDriver setup
SQLiteBuilt-in — nothing to install
MySQL./jperl Configure.pl --search mysql-connector-java
PostgreSQL./jperl Configure.pl --search postgresql
Oracle./jperl Configure.pl --search ojdbc

Image::Magick — Image Processing

Image::Magick is a pure-Perl CLI wrapper that delegates to ImageMagick command-line tools. It provides the same API as the CPAN XS module (Read, Write, Resize, Crop, Annotate, etc.) without requiring native PerlMagick bindings.

Requires ImageMagick CLI tools to be installed and in PATH.

# macOS
brew install imagemagick

# Ubuntu / Debian
sudo apt install imagemagick

# Windows
choco install imagemagick

ImageMagick 7 (magick command) is preferred. ImageMagick 6 (convert/identify) is also supported on Linux and macOS.

use Image::Magick;
my $img = Image::Magick->new;
$img->Set(size => '200x200');
$img->Read('xc:white');
$img->Resize(geometry => '100x100');
$img->Write('output.png');

See the design document for implementation details: dev/modules/image_magick.md.


Plack::Handler::Netty — Web Server

Plack::Handler::Netty provides a PSGI-compliant web server using Netty's async I/O. Supports HTTP/HTTPS, streaming responses, and runs any PSGI application.

use Plack::Handler::Netty;

my $app = sub {
    my ($env) = @_;
    return [200, ['Content-Type' => 'text/plain'], ['Hello!']];
};

my $handler = Plack::Handler::Netty->new(port => 5000);
$handler->run($app);

Performance: 32,000+ req/sec for simple responses. See full documentation: examples/http_server_plack/README.md.


Moose / Class::MOP

PerlOnJava bundles upstream Moose 2.4000 in the JAR — use Moose; works out of the box, no extra install needed.

use Moose;

has name => (is => 'ro', isa => 'Str', required => 1);
has age  => (is => 'rw', isa => 'Int', default  => 0);

__PACKAGE__->meta->make_immutable;

Status

The bundled stack passes the bulk of the upstream test suites:

SuiteFilesAssertsResult
Moose 2.4000 own tests≥396/478≥13413/13550 (~99%)Mostly green
DBIx::Class 0.082843 (depends on Moo; both installed via jcpan)314/31413858/13858PASS

Run the full Moose test suite locally with:

./jcpan -t Moose

DBIx::Class itself depends on Moo, not Moose. Both are pure-Perl modules — jcpan will install them from CPAN before running the test suite:

./jcpan -t DBIx::Class

Known limitations

The remaining ~80 failing test files cluster around features that are deliberately out of scope or genuinely unimplemented:

  • threads / fork — PerlOnJava has neither. The handful of tests that exercise share, lock, or fork-based DEMOLISH timing cannot pass and are expected to fail.
  • Numeric warning messages (Argument "x" isn't numeric in addition) — PerlOnJava does not emit these specific warning categories yet.
  • Stack-trace shape — frames inside generated method modifiers may stringify as __ANON__ rather than Pkg::method.
  • Moose::Exception attributes named INC — attribute name collision with the @INC global.
  • Anonymous metaclass GC timing — depends on the JVM's reachability walker scheduler; deterministic only for hierarchies in the Class::MOP / Moose / Moo class set.
  • Native trait Hash coerce + delete — corner cases in the generated coercion path.

For the up-to-date list and design rationale, see dev/modules/moose_support.md.

Performance

The bundled Moose stack runs the DBIx::Class test suite in ~29 minutes on this hardware (single-job mode). No formal comparison to CPAN-Perl + XS is published yet.


Module Categories

Core / Pragmas

These are loaded automatically or via use:

ModuleImplementationNotes
strictJava
warningsJava
utf8Java
featureJava
integerJava
bytesJava
libJava
baseJava
parentJava
varsJava
subsJava
attributesJava
overloadJava + Perl
overloadingJava
reJava
mroJava
builtinJava
versionJava + Perl
ExporterPerl
AutoLoaderPerl
EnglishPerl
EnvPerl
FatalPerl
ConfigPerl
ErrnoPerl
FcntlPerl
BPerlPartial — enough for B::Deparse
UNIVERSALJavaisa, can, DOES, VERSION

Data Processing

ModuleImplementationNotes
Data::DumperJava + Perl
JSON / JSON::PPPerlJSON delegates to the bundled pure-Perl JSON::PP
Cpanel::JSON::XS (+ ::Type, ::Boolean)PerlSame encoder/decoder as JSON::PP; XS-only type-aware encode_json / decode_json arguments are not supported
YAML::PPJava + Perl
TOMLJava
Text::CSVJava
StorableJava + Perlfreeze, thaw, dclone, store, retrieve, nstore, nfreeze — produces and consumes the native Perl pst0 binary format, interoperable with system perl in both directions. See dev/modules/storable_binary_format.md.
CloneJava + PerlDeep copy
Scalar::UtilJavablessed, reftype, weaken, dualvar, etc.
List::UtilJavareduce, first, min, max, sum, mesh/zip, etc.
Hash::UtilJavalock_keys, lock_hash, etc.

File & I/O

ModuleImplementationNotes
File::SpecJava + PerlPlatform-specific variants included
File::BasenamePerl
File::CopyPerl
File::FindPerl
File::GlobPerl
File::PathPerlmake_path, remove_tree
File::TempJava + Perl
File::statPerl
File::ComparePerl
CwdJava
IO::FilePerl
IO::HandleJava + Perl
IO::DirPerl
IO::SelectPerl
IO::SeekablePerl
IO::ZlibPerl
FileHandlePerl
DirHandlePerl
SelectSaverPerl
PerlIO::encodingPerl

Network & Web

ModuleImplementationNotes
HTTP::TinyJava + PerlJava HttpClient backend
HTTP::DatePerl
HTTP::CookieJarPerl
SocketJava + Perl
IO::Socket::INETPerl
IO::Socket::IPPerl
IO::Socket::UNIXPerl
IO::Socket::SSLJava + PerlUses JVM TLS (JSSE) — no OpenSSL needed
Net::SSLeayJava + PerlUses JVM TLS (JSSE) — no OpenSSL needed
Net::FTPPerl
Net::SMTPPerl
Net::POP3Perl
Net::NNTPPerl
Net::PingPerl
Net::CmdPerl
URI::EscapePerl

Database

ModuleImplementationNotes
DBIJava + PerlJDBC backend; see Database Access
DBD::SQLitePerlBuilt-in — no driver setup needed
DBD::MemPerlIn-memory tables

Cryptography & Encoding

ModuleImplementationNotes
Digest::MD5Javajava.security.MessageDigest
Digest::SHAJavajava.security.MessageDigest
DigestPerl
MIME::Base64Java
MIME::QuotedPrintJava
EncodeJava + Perl
Unicode::NormalizeJava
Unicode::UCDJava

Archives & Compression

ModuleImplementationNotes
Archive::TarPerl
Archive::ZipJava + PerlUses java.util.zip
Compress::Bzip2Java + PerlUses Apache Commons Compress
Compress::Raw::Bzip2Java + PerlUses Apache Commons Compress
Compress::Raw::ZlibJavaUses java.util.zip
Compress::ZlibJava + Perl
IO::ZlibPerl

XML & HTML

ModuleImplementationNotes
XML::ParserPerl
XML::Parser::ExpatJavaUses Java SAX parser
HTML::ParserJava

Image Processing

ModuleImplementationNotes
Image::MagickPerlCLI wrapper; requires magick in PATH

Date & Time

ModuleImplementationNotes
Time::HiResJavaSystem.nanoTime()
Time::PieceJava + Perl
Time::LocalPerl
DateTimeJava + PerlJava backend bundled; install DateTime from CPAN with jcpan -i DateTime (timezone data gets frequent updates)
POSIXJavaIncludes strftime, mktime, etc.

Math

ModuleImplementationNotes
Math::BigIntJavaUses java.math.BigInteger

Process Control

ModuleImplementationNotes
IPC::Open2Perl
IPC::Open3Java
IPC::System::SimplePerl

Terminal

ModuleImplementationNotes
Term::ReadKeyJava
Term::ReadLineJava
Term::ANSIColorPerl
Term::TablePerl
IO::TtyJava + PerlPTY allocation, terminal constants, winsize ops via FFM
IO::PtyPerlPseudo-terminal pairs; depends on IO::Tty
IO::Tty::ConstantJava + PerlTerminal ioctl constants (TIOCGWINSZ, etc.)

OOP & Introspection

ModuleImplementationNotes
Scalar::UtilJava
Sub::NameJava
Sub::UtilJava
Class::StructPerl
Attribute::HandlersPerl
Devel::CyclePerl
Devel::PeekPerl
Class::XSAccessor / Class::XSAccessor::ArrayPerlPure-Perl replacement for the CPAN XS accessors; no entersub optimizer
Class::MOPPerlUpstream 2.4000 source
MoosePerlUpstream 2.4000 source; ~99% of upstream tests pass (no threads). See note below.
BPerlsvref_2object, B::CV/GV/STASH, CVf_ANON, etc. — enough for Class::MOP::get_code_info and B::Deparse.

Testing

ModuleImplementationNotes
Test::MorePerl
Test::SimplePerl
Test::BuilderPerl
Test::HarnessPerl
Test2::SuitePerlFull Test2 stack (~100 files)
TAP::HarnessPerlFull TAP stack (~43 files)
App::ProvePerlprove command

Build & Install

ModuleImplementationNotes
ExtUtils::MakeMakerPerlPerlOnJava-specific version
CPANPerlFull CPAN client (~30 sub-modules)
CPAN::MetaPerl
Module::Build::BasePerl
Parse::CPAN::MetaPerl
DynaLoader / XSLoaderJavaRoutes XS loads to Java implementations

Documentation

ModuleImplementationNotes
Pod::SimplePerl~22 sub-modules
Pod::PerldocPerl~12 sub-modules
Pod::TextPerl+ Color, Overstrike, Termcap
Pod::ManPerl
Pod::UsagePerl
Pod::CheckerPerl
Pod::HtmlPerl+ Pod::Html::Util; pod2html POD-to-HTML converter

Java Integration

ModuleImplementationNotes
Java::SystemJava + PerlAccess JVM system properties

Miscellaneous

ModuleImplementationNotes
Getopt::LongPerl
Getopt::StdPerl
Sys::HostnameJava
I18N::LanginfoJava
BenchmarkPerl
Filter::SimplePerl
Filter::Util::CallJava
Tie::Hash / Tie::Array / Tie::ScalarPerl
Tie::RefHashPerl

Implementation Types

  • Java — Core functionality implemented in Java for performance or JVM integration. These are in src/main/java/org/perlonjava/runtime/perlmodule/.
  • Perl — Pure-Perl module bundled in the JAR (src/main/perl/lib/).
  • Java + Perl — Java provides the XS-equivalent functions; a Perl .pm file provides the high-level API.

Adding a New Bundled Module

To bundle a new module into PerlOnJava, see the Module Porting Guide. After adding the module, update this page — add an entry to the appropriate category table with the module name, implementation type, and any notes about external requirements.

See Also