Core LibraryunreleasedAPI Reference

Choose documentation 2

latest

Current version

latest
English

Unreleased LibTmux has not been released. Its API may change during development. This site's structure and URLs may change too.

class libtmux-perl latest

WindowLinkSelection

Native array selection of captured window_link entities

Base types LibTmux::Selection
Source and package
Qualified name
LibTmux::WindowLinkSelection
Module
LibTmux
Package
LibTmux
Source
packages/core/lib/LibTmux/WindowLinkSelection.pm

Description#

DESCRIPTION

Inherits the fixed-return local query API of LibTmux::Selection. Members must be defined LibTmux::WindowLink handles from one server generation. Empty instances still validate against the window_link schema. Native array edits are possible; query methods validate membership and never perform tmux I/O.

Inherited members10 members#

Reached through LibTmux::Selection.

  • count method inherited count($criteria?) returns an integer. Empty input returns zero. Validate all members before evaluating the optional criterion; count every matching occurrence, including duplicates.
  • exists method inherited exists($criteria?) returns a native Boolean. Empty input returns false. After validating the entire membership, stop at the first matching entity. A reference itself remains true even when empty.
  • first method inherited first($criteria?) returns the first matching entity or undef. Input order determines first; after membership validation, later field reads may be skipped.
  • grep method inherited grep($callback) returns a new same-class selection. Invoke the callback in scalar context with exactly one entity argument and a localized $_. Both bindings hold copies of the reference: assignment cannot replace a source slot. Restore $_ and propagate the original thrown value even on failure. Predicates must not edit the traversed sequence.
  • iterator method inherited Return a fresh local cursor with a copy of current membership. Its next returns an entity or undef only at exhaustion. Later native array edits do not alter this traversal; the selection remains replayable.
  • new method inherited new(@entities) creates a concrete blessed array reference and validates every member. Construct an entity-specific selection such as LibTmux::PaneSelection; an empty instance retains that schema.
  • one method inherited one($criteria?) returns one entity. Zero throws NoMatch; a second occurrence throws MultipleMatches, reporting at least two and their IDs. Two occurrences of one identity are still ambiguous.
  • one_or_undef method inherited one_or_undef($criteria?) returns an entity or undef for absence. A second matching occurrence still throws MultipleMatches.
  • to_array method inherited Return a fresh, unblessed array reference containing the same entity references. Editing its membership cannot corrupt graph adjacency or this selection. Captured entity values remain read-only through public readers.
  • where method inherited where($criteria_or_filter) eagerly returns a new selection of the same concrete class in scalar, list, or void context. Complete validation precedes evaluation, including on empty input. See "new" in LibTmux::Filter. Order and duplicate occurrences are preserved.
Esc

Type to search.

Reference previewOpen reference