We welcome contributions! This guide will help you get started.
PerlOnJava is actively developed in its compatibility and performance phase. The broad language implementation is in place, so the highest-impact work now closes remaining Perl behavior gaps, expands CPAN compatibility, and improves CPU and memory performance.
- Report bugs - Open issues on GitHub
- Fix bugs - Submit pull requests
- Add features - Implement missing Perl features
- Improve docs - Fix typos, add examples, clarify explanations
- Port modules - Help port CPAN modules to PerlOnJava
- Write tests - Add test coverage
- Share compatibility results - Report reproducible
jcpan -tfailures - Measure performance - Contribute repeatable CPU, memory, and startup benchmarks
For issue evidence, classification, and planning conventions, see the Issue Reporting and Triage guide.
# Clone repository
git clone https://github.com/fglock/PerlOnJava.git
cd PerlOnJava
# Build and run tests
make # Build + run all unit tests
# Run comprehensive tests
make test-all
Before making changes:
- Create a feature branch:
git checkout -b feature-name - Never push directly to master — always use feature branches and PRs
- Read the Architecture Guide
- Check Project Status and Roadmap for current priorities
While coding:
- Follow existing code style
- Run
makefrequently to ensure tests pass - Add tests for new features in
src/test/resources/unit/
Before committing:
- Ensure
makepasses (all unit tests) - Write clear commit messages
- Push your branch:
git push origin feature-name - Open a PR on GitHub
- Describe what your PR does and why
- Link related issues
The #1 priority is keeping make working. All unit tests must pass.
src/main/java/org/perlonjava/
├── app/ # CLI entry point and JSR-223 ScriptEngine
├── frontend/ # lexer, parser, AST nodes, semantic analysis
├── backend/
│ ├── jvm/ # JVM bytecode emitter (ASM)
│ └── bytecode/ # bytecode interpreter backend
├── runtime/
│ ├── runtimetypes/ # RuntimeScalar, RuntimeArray, RuntimeHash, RuntimeCode, ...
│ ├── operators/ # Perl operator implementations
│ ├── regex/ # regex engine integration
│ ├── io/ # file handles and I/O layers
│ └── perlmodule/ # Java implementations of Perl (XS) modules
└── core/ # build-time configuration
src/main/perl/lib/ # bundled Perl modules
src/test/resources/ # Perl test files
third_party/joni/ # forked regex engine
- Lexer (
frontend/lexer/) - Tokenizes Perl source - Parser (
frontend/parser/) - Builds the AST from tokens - JVM backend (
backend/jvm/) - Emits JVM bytecode using the ASM library - Interpreter backend (
backend/bytecode/) - Compiles the AST to custom bytecode and interprets it - Runtime (
runtime/runtimetypes/) - RuntimeScalar, RuntimeArray, RuntimeHash, RuntimeCode - Operators (
runtime/operators/) - Perl operator implementations
See the Architecture Guide for details.
src/test/resources/
└── unit/ # Fast unit tests (run in seconds)
perl5_t/ (at project root)
├── t/ # Perl 5 core test suite
└── [Module]/ # Perl 5 module tests
# Build + run all unit tests (default)
make
# Run all tests including Perl 5 core tests
make test-all
# Run single test
./jperl path/to/test.t
- Create
.tfile insrc/test/resources/unit/ - Use TAP format (Test::More compatible)
- Test should complete in < 1 second
- Run with
./jperl path/to/test.t
Example test:
print "1..3\n"; # Plan
print "ok 1 - basic test\n";
my $x = 1 + 1;
print $x == 2 ? "ok 2\n" : "not ok 2\n";
print "ok 3 - done\n";
# Show debug information
./jperl --debug -E 'code'
# Check syntax only
./jperl -c script.pl
# Show disassembled bytecode
./jperl --disassemble script.pl
# Run lexer only
./jperl --tokenize -E 'code'
# Run parser only
./jperl --parse -E 'code'
User-facing documentation is in docs/:
- getting-started/ - Installation, quick start, Docker
- guides/ - How-to guides (database, Java integration, modules)
- reference/ - Technical reference (features, testing, architecture)
- about/ - Project information (why, roadmap, support)
Developer documentation is in dev/ (see dev/README.md):
- architecture/ - How subsystems work today, including per-feature implementation notes
- design/ - Proposals and active plans; finished work is in
dev/archive/ - modules/ - CPAN module porting notes
- tools/ - Developer scripts
See also AGENTS.md for detailed testing commands, unimplemented features, environment variables, and git workflow rules.
- Check if it's in Feature Matrix
- Review Roadmap
- Open an issue to discuss the approach
- Read relevant design docs in
dev/
When modifying these, test extensively:
- String parsing (
frontend/parser/StringDoubleQuoted.java) - Lexer (
frontend/lexer/Lexer.java) - Unicode handling - Surrogate pairs, identifier parsing
- Control flow - die/eval, loop control
- Bytecode generation (
backend/jvm/,backend/bytecode/)
- Implement in the
runtime/operators/package - Add parser support in
frontend/parser/ - Add tests in
src/test/resources/unit/ - Update Feature Matrix
See Module Porting Guide for:
- How to port pure-Perl modules
- Implementing XS modules in Java
- Using XSLoader mechanism
- GitHub Issues - Bug reports and feature requests
- Pull Requests - Code contributions
- Discussions - Questions and design discussions
PerlOnJava accepts AI-assisted contributions with proper attribution. See AI_POLICY.md for our full policy on commit attribution, human responsibility, and how our approach compares to other open-source projects.
All participants are expected to follow the Code of Conduct.
- Read the Architecture Guide
- Check existing Issues
- Ask in Discussions
- See Support for more resources
By contributing, you agree that your contributions will be licensed under the same terms as Perl 5 (Artistic License or GPL v1+).