v2.3.0: Enhanced Syntax, Regex, and New Modules
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 (
signaturefeature). classkeyword 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_truefeature for module boolean handling.
- Subroutine signatures (
-
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.
- Modifiers:
-
Overloading:
- Added
""(stringify),0+(numerify),bool,fallback, andnomethodhandlers.
- Added
New Modules:
YAMLandYAML::PPfor YAML data serialization.Text::Balancedfor extracting delimited text structures.Unicode::Normalizefor Unicode normalization forms.
Command-Line Improvements:
- Added
jperlandjperl.batwrapper scripts for streamlined execution.
Configuration and Documentation:
- Updated project description to "A Perl Distribution for the JVM" in
README.md. - Added
docs/PORTING_MODULES.mdguide 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!