LibTmux::Workspace
- package Lib
Tmux:: ;Workspace -
Versioned JSON configuration and owned orchestration
Description#
SYNOPSIS
use LibTmux::Workspace;my $workspace = LibTmux::Workspace->from_json($json_octets);my $plan = $workspace->plan(existing => 'error');my $report = $workspace->load(server => $server);COMMAND LINE
The packaged
libtmux-workspaceexecutable exposesvalidate,plan, andload.--dry-runselects planning without tmux I/O. See the installed executable's help for socket and repeat-application options.
Members4#
Common operations2#
- load method
load(server => $server, existing => 'error'|'skip')uses publicLibTmux::Serveroperations. It checks all session-name conflicts before creation.errorrejects any existing target withConflict;skipleaves that entire session alone, so repeated application creates only absent sessions. A missing server permits explicit creation; other acquisition failures propagate. - new method
new(config => $hashref)validates and copies alibtmux.workspace/v1configuration. No I/O occurs. Sessions contain named windows with nonempty pane arrays. Each pane requires literalcommandarguments or an explicitshell_command. Environment values inherit from workspace, session, and window, with pane values taking precedence. All configuration errors throwConfig.
Other members2#
- from_json method Decode bounded UTF-8 JSON octets with core JSON::PP and call
"new". Reject unsupported versions, unknown keys, invalid commands, and duplicate names. YAML is not part of this distribution. - plan method
plan(existing => 'error'|'skip')returns a fresh data plan in input order. It performs no tmux I/O or mutations. A dry-run does not prove live availability or command success. Exports share no mutable arrays with the loader. No context-dependent return values are used.