Hi r/perl!
I want to share a project I've been working on called tispen (Tcl Interactive Sql & Perl Environmental Notebook). It’s a zero-overhead, keyboard-driven text editor and interactive environment built for the terminal.
It embeds the console editor tcled and links it with a live Perl evaluation engine.
Why build this?
I needed a way to combine documentation, raw Perl scripts, and active SQL analysis in a single file without leaving the terminal or juggling heavy GUI tools. It works with standard .sess.in session files, meaning everything is plain text and 100% Git-friendly.
The Killer Feature: Infinite Connection Flexibility
Most SQL clients assume you have a standard host/user/password string. But in production environments, things are rarely that simple. Since tispen uses live Perl states, your database handle ($::dbh) can be initialized by any arbitrary Perl code.
If you don't have a direct password and need to call a corporate auth module, you just execute it in a block:
use My::Company::Auth;
$::dbh = My::Company::Auth::get_secure_connection(env => 'prod');
You can invoke your own modules, parse configurations, or rotate tokens without closing the editor.
Features:
Persistent State: Perl keeps live database connections and variable pools in memory while you edit.
Polyglot Blocks: Mix raw Perl (=perl) and SQL statements (=sql) with Text::Template interpolation.
ASCII Renders: Formats SQL query outputs right into the file as beautiful ASCII/Jira tables.
Tcl under the hood: You can inspect and evaluate the editor's Tcl interpreter state on the fly.
Check out the repository and an example session here: https://github.com/vadrerko/tispen
Would love to hear your thoughts, feedback, or any edge cases you think a tool like this should handle!