Skip to content

Releases: BlueSquare23/Term-ReadLine-Repl

Version 0.0.1

14 Mar 16:48
56c8f03

Choose a tag to compare

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 a Getopt::Long parsing function to handle flag-style arguments.
  • custom_logic - inject arbitrary mid-loop logic with control flow (next/last)
    and the ability to swap cmd_schema dynamically at runtime.
  • passthrough - forward !command input directly to the system shell without
    leaving the REPL.

Distribution

  • Build.PL with full dependency declarations
  • META.yml and MANIFEST for 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