| 1 | package LibTmux::Selection::Iterator; | ||||||||||
| 2 | 4 | ▶ | use v5.44; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | 1 | ▶ | sub next ($self) { | ||||||||
|
Subroutine
next: called CC=2 SCAR=7.2
Pod
documented
| |||||||||||
| 5 | 1 | ▶ | return undef if $self->{next} >= $self->{items}->@*; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 6 | 1 | return $self->{items}[$self->{next}++]; | |||||||||
| 7 | } | ||||||||||
| 8 | |||||||||||
| 9 | =head1 NAME | ||||||||||
| 10 | |||||||||||
| 11 | LibTmux::Selection::Iterator - Local cursor over frozen membership | ||||||||||
| 12 | |||||||||||
| 13 | =head1 METHODS | ||||||||||
| 14 | |||||||||||
| 15 | =head2 next | ||||||||||
| 16 | |||||||||||
| 17 | Return the next captured entity or undef only at exhaustion. Order and | ||||||||||
| 18 | multiplicity match creation-time membership. Later native selection edits do | ||||||||||
| 19 | not change this traversal. A cursor is consumable; create a fresh cursor with | ||||||||||
| 20 | L<LibTmux::Selection/iterator> to traverse again. No tmux I/O occurs. | ||||||||||
| 21 | |||||||||||
| 22 | =cut | ||||||||||