{"id":16311078,"url":"https://github.com/fglock/perlonjava","last_synced_at":"2025-03-20T21:31:51.809Z","repository":{"id":251418539,"uuid":"837349296","full_name":"fglock/PerlOnJava","owner":"fglock","description":"An implementation of the Perl programming language designed to run on the Java platform","archived":false,"fork":false,"pushed_at":"2024-10-27T20:16:45.000Z","size":3063,"stargazers_count":18,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-27T23:28:47.714Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fglock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-02T19:02:42.000Z","updated_at":"2024-10-27T20:16:49.000Z","dependencies_parsed_at":"2024-10-27T21:56:11.976Z","dependency_job_id":"5b7f7fbf-fe76-412b-a90d-5020b0ef5478","html_url":"https://github.com/fglock/PerlOnJava","commit_stats":null,"previous_names":["fglock/perlonjava"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fglock%2FPerlOnJava","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fglock%2FPerlOnJava/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fglock%2FPerlOnJava/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fglock%2FPerlOnJava/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fglock","download_url":"https://codeload.github.com/fglock/PerlOnJava/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221809062,"owners_count":16883846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T21:43:32.995Z","updated_at":"2025-03-20T21:31:51.801Z","avatar_url":"https://github.com/fglock.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PerlOnJava: A Perl Distribution for the JVM\n\nPerlOnJava provides a Perl distribution designed to run natively on the Java Virtual Machine (JVM).\nIt allows Perl scripts to integrate seamlessly with Java-based ecosystems while offering familiar tools and modules for Perl development.\n\nThe JAR package features a variety of Perl modules, such as `DBI` (with JDBC support), `HTTP::Tiny`, `JSON`, `YAML`, `File::Find`, and `Data::Dumper`.\nUsers can also add their own database JDBC drivers, making it a flexible solution for cross-platform Perl applications.\n\n## Table of Contents\n\n1. [Introduction](#introduction)\n2. [Why PerlOnJava](docs/WHY_PERLONJAVA.md)\n3. [Target Audience](#target-audience)\n4. [Quick Start](#quick-start)\n5. [Features and Limitations](docs/FEATURE_MATRIX.md)\n6. [Build Instructions](docs/BUILD.md)\n7. [Running with Docker](docs/DOCKER.md)\n8. [Running the JAR File](#running-the-jar-file)\n9. [Debugging Tools](#debugging-tools)\n10. [Architecture](docs/ARCHITECTURE.md)\n11. [Porting Modules](docs/PORTING_MODULES.md)\n12. [Milestones](MILESTONES.md)\n13. [Community and Support](docs/SUPPORT.md)\n14. [License](#license)\n15. [Additional Resources](docs/RESOURCES.md)\n\n## Introduction\n\nPerlOnJava bridges the gap between Perl and Java by providing a platform that compiles Perl scripts into Java bytecode, making them executable on the JVM.\nBy leveraging this distribution, developers can run familiar Perl code while accessing Java's ecosystem of libraries and tools.\nThis project aims to bring the strengths of Perl to modern JVM environments while supporting a growing list of core modules and pragmas.\n\nNeed help? Check out our [Community and Support](docs/SUPPORT.md) section.\n\n### What This Project Is\n\n- **A JVM-Native Perl Implementation**: Runs Perl code directly on the Java Virtual Machine\n- **A Bridge to Java Ecosystems**: Enables Perl scripts to interact with Java libraries and frameworks\n- **A Cross-Platform Solution**: Provides consistent Perl behavior across different operating systems via JVM\n- **A Modern Integration Tool**: Allows Perl codebases to participate in Java-based enterprise environments\n\n## Target Audience\n\n- **Java Developers with Perl Knowledge**: Provides a method for integrating Perl scripts into Java applications.\n- **Compiler and Language Enthusiasts**: Offers insights into translating high-level languages into JVM bytecode.\n- **Experimenters and Tinkerers**: A tool for experimenting with language interoperability.\n\n\n## Quick Start\n\nGet started quickly with PerlOnJava. For a complete list of capabilities, see our [Feature Matrix](docs/FEATURE_MATRIX.md).\n\n1. Build the project ([detailed instructions](docs/BUILD.md)):\n   ```bash\n   mvn clean package\n   ```\n\n2. Run a simple Perl script:\n\n\u003cdetails open\u003e\n\u003csummary\u003eLinux/Mac\u003c/summary\u003e\n\n```bash\n./jperl -E 'say \"Hello World\"'\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWindows\u003c/summary\u003e\n\n```bash\njperl -E \"say 'Hello World'\"\n```\n\u003c/details\u003e\n\n3. Use Perl in your Java application:\n   ```java\n   import javax.script.*;\n   \n   public class TestPerl {\n      public static void main(String[] args) throws Exception {\n         ScriptEngineManager manager = new ScriptEngineManager();\n         ScriptEngine engine = manager.getEngineByName(\"perl\");\n         engine.eval(\"print 'Hello from Java-integrated Perl!\\n'\");\n      }\n   }\n   ```\n\n4. Connect to a database:\n   ```perl\n   use DBI;\n   my $dbh = DBI-\u003econnect(\"jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1\");\n   $dbh-\u003edo(\"CREATE TABLE test (id INT, name VARCHAR(50))\");\n   $dbh-\u003edo(\"INSERT INTO test VALUES (1, 'Hello World')\");\n   ```\n\n## Running the JAR File\n\n1. **Show Instructions**:\n\u003cdetails open\u003e\n\u003csummary\u003eLinux/Mac\u003c/summary\u003e\n\n```bash\n./jperl --help\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWindows\u003c/summary\u003e\n\n```bash\njperl --help\n```\n\u003c/details\u003e\n\n2. **Execute Something**:\n\u003cdetails open\u003e\n\u003csummary\u003eLinux/Mac\u003c/summary\u003e\n\n```bash\n./jperl -E 'print 123'\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWindows\u003c/summary\u003e\n\n```bash\njperl -E \"print 123\"\n```\n\u003c/details\u003e\n\n## Debugging Tools\n\n1. **Execute Emitting Debug Information**:\n\u003cdetails open\u003e\n\u003csummary\u003eLinux/Mac\u003c/summary\u003e\n\n```bash\n./jperl --debug -E 'print 123'\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWindows\u003c/summary\u003e\n\n```bash\njperl --debug -E \"print 123\"\n```\n\u003c/details\u003e\n\n2. **Compile Only; Can Be Combined with --debug**:\n\u003cdetails open\u003e\n\u003csummary\u003eLinux/Mac\u003c/summary\u003e\n\n```bash\n./jperl -c -E 'print 123'\n./jperl --debug -c -E 'print 123'\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWindows\u003c/summary\u003e\n\n```bash\njperl -c -E \"print 123\"\njperl --debug -c -E \"print 123\"\n```\n\u003c/details\u003e\n\n3. **Execute and Emit Disassembled ASM Code**:\n\u003cdetails open\u003e\n\u003csummary\u003eLinux/Mac\u003c/summary\u003e\n\n```bash\n./jperl --disassemble -E 'print 123'\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWindows\u003c/summary\u003e\n\n```bash\njperl --disassemble -E \"print 123\"\n```\n\u003c/details\u003e\n\n4. **Run the Lexer Only**:\n\u003cdetails open\u003e\n\u003csummary\u003eLinux/Mac\u003c/summary\u003e\n\n```bash\n./jperl --tokenize -E 'print 123'\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWindows\u003c/summary\u003e\n\n```bash\njperl --tokenize -E \"print 123\"\n```\n\u003c/details\u003e\n\n5. **Run the Parser Only**:\n\u003cdetails open\u003e\n\u003csummary\u003eLinux/Mac\u003c/summary\u003e\n\n```bash\n./jperl --parse -E 'print 123'\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWindows\u003c/summary\u003e\n\n```bash\njperl --parse -E \"print 123\"\n```\n\u003c/details\u003e\n\n## License\n\nThis project is licensed under the Perl Artistic License 2.0 - see the [LICENSE](LICENSE.md) file for details.\n\n![Java CI with Maven](https://github.com/fglock/PerlOnJava/workflows/Java%20CI%20with%20Maven/badge.svg)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffglock%2Fperlonjava","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffglock%2Fperlonjava","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffglock%2Fperlonjava/lists"}