Releases: BlueSquare23/Term-ReadLine-Repl
Release list
Version 0.0.2
v0.0.2 - 2026-05-07
This release is a bug-fix and polish update for Term::ReadLine::Repl, addressing
several correctness issues in the core run loop, input handling, and argument
validation, along with an improved example and a new Zork demo script.
Bug Fixes
Help dispatch now uses exact string matching
The built-in help command was matched with a regex substring check, meaning any
input containing the word "help" (e.g. helpdesk, get-help) would incorrectly
trigger the help menu. It now requires an exact match.
History file no longer accumulates duplicate entries across sessions
The history file was being opened in append mode on save, causing entries to pile
up with every session. It now overwrites the file with the full current history on
exit, keeping things clean.
Shell passthrough no longer corrupts commands containing !
The ! prefix stripping logic was removing every ! character from the command
token rather than just the leading one. Commands like echo hello! passed through
to the shell were silently mangled. Fixed to strip only the leading !.
Input whitespace trimmed after chomp
Leading and trailing whitespace is now stripped from input after chomp, so
commands with accidental surrounding spaces are handled correctly throughout the
run loop.
args validation now requires an ARRAY ref
Previously, any reference type was accepted for the args constructor argument,
meaning a mistyped hashref or coderef would silently pass validation and cause
confusing failures later. Validation now explicitly requires an ARRAY ref, and
tests have been added to cover this.
Help menu output cleaned up
The = character has been removed from the help output, and a stale leftover
message in the history read/write warning has been cleaned up.
New & Changed
Zork example script
A new zork.pl example script has been added to the distribution. You gotta have
Zork!
Improved example.pl
The existing example script has been updated to be more representative of real-world
module usage.
GitHub link in META.yml
The repository URL is now included in META.yml for better CPAN metadata.
Install / Upgrade
cpanm Term::ReadLine::Repl
Version 0.0.1
Initial Release - v0.0.1
This is the first release of Term::ReadLine::Repl, a batteries-included framework
for building interactive command-line REPLs on top of Perl's Term::ReadLine.
The module is now available on CPAN:
cpanm Term::ReadLine::Repl
What's Included
Core REPL loop
A ready-to-run interactive prompt with a welcome message, colored output via
Term::ANSIColor, and built-in help and quit/exit commands out of the box.
Tab completion
Command names and their arguments are completed automatically from your cmd_schema
definition. Shell passthrough commands (prefixed with !) are excluded from completion.
Command history
In-session history via Term::ReadLine, with optional persistence across sessions
using the hist_file constructor argument.
Argument validation
validate_args() provides clear, descriptive croak messages for missing or malformed
constructor arguments, so misconfiguration is caught early.
Extensibility hooks
get_opts- plug in aGetopt::Longparsing function to handle flag-style arguments.custom_logic- inject arbitrary mid-loop logic with control flow (next/last)
and the ability to swapcmd_schemadynamically at runtime.passthrough- forward!commandinput directly to the system shell without
leaving the REPL.
Distribution
Build.PLwith full dependency declarationsMETA.ymlandMANIFESTfor CPAN packaging- Full POD documentation rendered on MetaCPAN - Term::ReadLine::Repl
- Test suite covering croak paths, construction sanity, and tab completion behavior
- CI via GitHub Actions across Perl 5.32, 5.36, and 5.38