Skip to content

v2.3.0: Enhanced Syntax, Regex, and New Modules

Compare
Choose a tag to compare
@fglock fglock released this 04 Feb 16:56
· 106 commits to master since this release

v2.3.0: Modern Perl Features, Expanded Modules, and Developer Tools

This release delivers substantial enhancements to PerlOnJava, introducing advanced language features, powerful regex capabilities, and tools to simplify module development and command-line usage.


Highlights

1. New Modules for Data Handling and Unicode:

Added YAML, YAML::PP, Text::Balanced, and Unicode::Normalize modules, enabling structured data serialization, text parsing, and Unicode processing.

2. Subroutine Signatures and class Keyword:

Support for subroutine signatures (sub foo ($x, $y) { ... }) and the experimental class keyword, modernizing Perl’s syntax for clearer code structure.

3. Advanced Regex Engine:

Added named capture groups ((?'name'...)), Unicode property support (\p{...}), possessive quantifiers (*+, ++), atomic groups ((?>...)), and modifiers (/p, /c, /n).

4. Wrapper Scripts for Seamless Execution:

Introducing jperl and jperl.bat scripts to simplify running Perl scripts on the JVM.

5. Operator and Overload Improvements:

Chained operators, stacked file tests (-f -r $file), and new overload methods ("", 0+, bool) for custom object behavior.


All Changes

New Features:

  • Syntax Enhancements:

    • Subroutine signatures (signature feature).
    • class keyword for experimental OOP.
    • Chained comparison operators (e.g., 1 < $x < 10).
    • Stacked file test operators (e.g., -f -r $file).
    • Here documents (<< and <<~ for indented text).
    • module_true feature for module boolean handling.
  • Regular Expressions:

    • Modifiers: /p (preserve match data), /c (continue match), /n (non-capturing groups).
    • Named capture groups (?'name'...) and backreferences \k<name>, \g{name}.
    • Unicode properties (\p{...}, \P{...}) and relative backreferences (\g{-n}).
    • Possessive quantifiers (*+, ++, ?+, {n,m}+).
    • Atomic groups ((?>...)) and (?^ to clear modifiers.
  • Overloading:

    • Added "" (stringify), 0+ (numerify), bool, fallback, and nomethod handlers.

New Modules:

  • YAML and YAML::PP for YAML data serialization.
  • Text::Balanced for extracting delimited text structures.
  • Unicode::Normalize for Unicode normalization forms.

Command-Line Improvements:

  • Added jperl and jperl.bat wrapper scripts for streamlined execution.

Configuration and Documentation:

  • Updated project description to "A Perl Distribution for the JVM" in README.md.
  • Added docs/PORTING_MODULES.md guide for porting Perl modules to the JVM.

Library Upgrades:

  • Updated Maven and Gradle dependencies to their latest versions.

This release empowers developers with cutting-edge Perl syntax, robust regex tools, and expanded module support, further bridging Perl’s flexibility with the JVM ecosystem.

Explore the project: GitHub
Porting Modules? Check the new PORTING_MODULES.md guide!