Time for a quick post about Reply, a new Perl toy from Jesse Luers. There will not be much for me to say, because I have only been playing with it for about twenty minutes.
NOTE
This post used Questhub.io for a subject. Unfortunately, that site is no longer with us.
Reply is a REPL for Perl. It is an interactive shell that simplifies quick experimentation with language features. It is extensible via a plugin system that I may look at later if I have more time.
Installation
I use perlbrew and cpanm, so installation was easy.
Oh. It is worth pointing out that if you do not have GNU Readline or a similar library installed, you will not get command-line editing or history in Reply.
Hello Reply
The reply
command starts a new session. Once the session is going, it’s pretty much just Perl.
Getting user input via STDIN
works pretty much how you would expect.
Defining subroutines is no big deal.
And exit
will quit Reply. It all seems straightforward.
A Marginally More Complex Example
I have been working on a little experiment: fetching Questhub.io JSON with Mojo::UserAgent and Mojo::JSON. I decided to see if I could try some of that experiment in Reply.
Yes, I can.
What Do I Think?
I like Reply overall. I am not used to thinking in REPL terms when it comes to Perl, and need to spend more than twenty minutes with it. I like Reply enough that I do expect to spend more time with it.
I noticed that my coding style was more terse within the confines of Reply. Maybe I should install GNU Readline support on my machine or enable the Editor plugin.
Backlinks
Got a comment? A question? More of a comment than a question?
Talk to me about this page on:
Added to vault 2024-01-15. Updated on 2024-02-01