Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PerlOnJava compiles Perl to JVM bytecode — run existing Perl scripts on any pl

- **Single jar distribution** — no installation, no dependencies beyond Java
- **Full toolchain** — `jperl`, `jperldoc`, `jcpan`, `jprove`
- **150+ modules included** — [DBI](docs/guides/database-access.md), HTTP::Tiny, JSON, XML::Parser, YAML, Text::CSV, and [more](docs/reference/bundled-modules.md)
- **150+ modules included** — [DBI](docs/guides/database-access.md), [Moose / Class::MOP](docs/reference/bundled-modules.md#moose--classmop), HTTP::Tiny, JSON, XML::Parser, YAML, Text::CSV, and [more](docs/reference/bundled-modules.md)
- **Install more with jcpan** — [pure-Perl CPAN modules](docs/guides/using-cpan-modules.md) work out of the box
- **JDBC database access** — [PostgreSQL, MySQL, SQLite, Oracle](docs/guides/database-access.md) via standard JDBC drivers
- **Embed in Java apps** — [JSR-223 ScriptEngine](docs/guides/java-integration.md) integration
Expand Down
1 change: 1 addition & 0 deletions docs/about/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Release history of PerlOnJava. See [Roadmap](roadmap.md) for future plans.
- Add `DESTROY` method support with cooperative reference counting on blessed objects, cascading destruction, closure capture tracking, and global destruction phase.
- Add `Scalar::Util` functions: `weaken`, `isweak`, `unweaken`.
- Add `Internals::SvREFCNT` for compatibility with reference-counting introspection (e.g. Sub::Quote, Moo, DBIx::Class internals).
- **Bundled Moose 2.4000 and Class::MOP 2.4000**: the upstream Moose source tree is shipped in `src/main/perl/lib/{Moose,Class/MOP}/`. Tested by installing `DBIx::Class` 0.082843 via `jcpan` (DBIx::Class itself uses `Moo`, fetched from CPAN) and running its test suite — it passes 100% (314 files / 13858 asserts). Upstream Moose's own test suite passes ~99% (≥396/478 files, ≥13413/13550 asserts). See [bundled modules](../reference/bundled-modules.md#moose--classmop) and [dev/modules/moose_support.md](../../dev/modules/moose_support.md) for the full status and the small set of remaining failure clusters (numeric-arg warnings, anon-class GC timing, threads/fork tests).

- Work in Progress
- [Multiplicity — per-runtime isolation for concurrent Perl interpreters](https://github.com/fglock/PerlOnJava/pull/480): `PerlRuntime` with `ThreadLocal`-based isolation; all mutable state (globals, I/O, regex, caller stack, method caches) moved to per-runtime instances; 122/126 concurrent interpreter tests pass; pending closure/method dispatch optimization
Expand Down
1 change: 1 addition & 0 deletions docs/about/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ These capabilities are implemented and available in the current release:

- **Dual Compilation Backends** — JVM bytecode (via ASM) and a fast register-based interpreter that share the same runtime. The interpreter handles large code blocks and fast eval-string compilation. See `dev/design/interpreter.md`.
- **CPAN Client (`jcpan`)** — Install, test, and manage pure-Perl CPAN modules. Working with DateTime (99.7% tests), Log::Log4perl (98.9% tests), Moo, Template, DBIx::Class, and many others. See `dev/design/cpan_client.md`.
- **Bundled Moose 2.4000 and Class::MOP** — the upstream Moose source tree ships in the JAR. Used as the runtime dependency for installing CPAN modules — for example `DBIx::Class` 0.082843 (which uses `Moo`, fetched from CPAN) passes 100% of its test suite under PerlOnJava. Upstream Moose's own tests pass ~99%. See [bundled modules](../reference/bundled-modules.md#moose--classmop) and `dev/modules/moose_support.md`.
- **Java XS Fallback Mechanism** — `XSLoader::load` transparently loads Java implementations for modules that normally use C XS code (e.g., DateTime, DBI, Digest::MD5, Digest::SHA). See `dev/design/xs_fallback.md`.
- **Perl Debugger (`-d`)** — Interactive debugger with breakpoints, step/next/return, stack traces, expression evaluation. See [Feature Matrix — Perl Debugger](../reference/feature-matrix.md#perl-debugger).
- **`class` Keyword** — Full support for `class`, `method`, `field`, `:param`, `:reader`, `:isa`, `ADJUST` blocks, lexical method calls.
Expand Down
71 changes: 71 additions & 0 deletions docs/reference/bundled-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,74 @@ See the design document for implementation details:

---

## Moose / Class::MOP

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

```perl
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:

| Suite | Files | Asserts | Result |
|-------|-------|--------:|--------|
| **Moose 2.4000 own tests** | ≥396/478 | ≥13413/13550 (~99%) | Mostly green |
| **DBIx::Class 0.082843** (depends on `Moo`; both installed via `jcpan`) | 314/314 | 13858/13858 | **PASS** |

Run the full Moose test suite locally with:

```bash
./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:

```bash
./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](../../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
Expand Down Expand Up @@ -260,6 +328,9 @@ These are loaded automatically or via `use`:
| `Attribute::Handlers` | Perl | |
| `Devel::Cycle` | Perl | |
| `Devel::Peek` | Perl | |
| `Class::MOP` | Perl | Upstream 2.4000 source |
| `Moose` | Perl | Upstream 2.4000 source; ~99% of upstream tests pass (no threads). See note below. |
| `B` | Perl | `svref_2object`, `B::CV`/`GV`/`STASH`, `CVf_ANON`, etc. — enough for `Class::MOP::get_code_info` and `B::Deparse`. |

### Testing

Expand Down
4 changes: 4 additions & 0 deletions docs/reference/feature-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ my @copy = @{$z}; # ERROR
- ✅ **Field inheritance**: Parent class fields are inherited.
- 🟡 **`__CLASS__`**: Compile-time evaluation only, not runtime.
- 🟡 **Argument validation**: Limited by operator implementation issues.
- ✅ **Moose / Class::MOP**: Moose 2.4000 is bundled.
Upstream Moose tests pass ~99%; DBIx::Class (installed via `jcpan`)
passes 100%. See
[bundled modules](bundled-modules.md#moose--classmop).
- ✅ **`DESTROY`**: Destructor methods with cooperative reference counting.

---
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/perlonjava/core/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public final class Configuration {
* Automatically populated by Gradle/Maven during build.
* DO NOT EDIT MANUALLY - this value is replaced at build time.
*/
public static final String gitCommitId = "c9a64f290";
public static final String gitCommitId = "d7eacf972";

/**
* Git commit date of the build (ISO format: YYYY-MM-DD).
Expand All @@ -48,7 +48,7 @@ public final class Configuration {
* Parsed by App::perlbrew and other tools via: perl -V | grep "Compiled at"
* DO NOT EDIT MANUALLY - this value is replaced at build time.
*/
public static final String buildTimestamp = "Apr 28 2026 20:42:14";
public static final String buildTimestamp = "Apr 28 2026 21:49:56";

// Prevent instantiation
private Configuration() {
Expand Down
Loading