- Perl 100%
storable_tui.pl:
- Replace flat flattened-path display with level-by-level tree navigation
- Breadcrumb label tracks current position ({root}->{key}->...)
- Enter/Right zooms into a branch; Left/u goes back up
- Tree view toggle (x) renders full hierarchy with Unicode box-drawing chars
- Edit/delete/new all work at any depth via rel_path on each item
- Bulk-edit sets all descendant leaf values when run on a branch
- Fix Enter key by overriding internal Curses::UI 'option-select' routine
README.md: document all features, key bindings, options, and helper scripts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
||
|---|---|---|
| README.md | ||
| storable_tui.pl | ||
perl-storable-modifier
Tools for inspecting and interactively editing Perl Storable cache files.
Useful when a script caches data in a Storable file and you occasionally need
to browse or tweak the contents without writing a one-off script.
storable_tui.pl — interactive TUI editor
A full-screen terminal UI (via Curses::UI) for browsing and editing nested
Storable files. Supports multi-level hashes and arrays with tree navigation.
Usage
storable_tui.pl [options] <storable_file>
Falls back to moviesync.cache if no file is given.
| Option | Meaning |
|---|---|
-h / --hash |
File was stored as a plain hash (store(\%h, ...)) rather than a scalar ref (store(\$ref, ...)) |
Navigation
The display shows one level of the hash/array at a time.
| Key | Action |
|---|---|
Enter / → / Space |
Zoom into the selected branch, or edit a leaf value |
← / u / Ctrl-U |
Go back up one level |
↑ / ↓ |
Move selection |
The breadcrumb at the top of the screen tracks your current position, e.g.
{root}->{hosts}->{mail.example.com}.
Tree view
Press x to toggle an expanded tree view that shows the full hierarchy from
the current level downward, rendered with Unicode box-drawing characters:
├─ {hosts}-> (2 children)
│ ├─ {mail.example.com}-> (3 children)
│ │ ├─ {ip} = 192.0.2.1
│ │ ├─ {count} = 42
│ │ └─ {last_seen} = 2026-05-10
│ └─ {smtp.example.com}-> (1 child)
│ └─ {ip} = 192.0.2.2
└─ {version} = 3
Pressing Enter on any item in tree view zooms into that exact level and
returns to normal view.
Editing commands
| Key | Action |
|---|---|
e / Ctrl-E |
Edit the selected leaf value; on a branch, bulk-set all descendant leaf values |
n / Ctrl-N |
Add a new key at the current level (Hash nodes only) |
d / Ctrl-D |
Delete the selected entry (and all its children if a branch) |
f / Ctrl-F |
Filter the current view by a search string |
x / X |
Toggle tree / normal view |
s / Ctrl-S |
Save changes back to the file |
q / Ctrl-Q |
Quit (prompts if there are unsaved changes) |
Changes are kept in memory until you save. The original file is not modified
until s is pressed.
Dependencies
Curses::UI
Storable
perl-retrieve-dumper-*.pl — quick dump utilities
Two symlinked scripts (same source) that print a Storable file via
Data::Dumper. The script detects which mode to use from its own filename:
| Script | Storable format |
|---|---|
perl-retrieve-dumper-hash.pl |
store(\%hash, ...) |
perl-retrieve-dumper-ref.pl |
store(\$ref, ...) |
perl-retrieve-dumper-ref.pl myfile.cache
perl-retrieve-dumper-hash.pl myfile.cache
conv.pl
One-off script that loads moviesync.cache (hash-ref format) and dumps it
sorted via Data::Dumper.