LibTmux/Selection/Iterator.pm

filter: Statementstmt 100% 4 / 4 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod 100% 1 / 1 totaltotal 88.8% 8 / 9 CC 2 SCAR 5.4
CC
2
Cov
83%
next
2.1
BEGIN
1.0
CRAP 1.7
« LibTmux/WindowLink.pm ↑ Summary LibTmux/X.pm »
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
BranchTrueFalseTotal
if $self->{"next"} >= @{$self->{"items"}} 0 1 1
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
« LibTmux/WindowLink.pm ↑ Summary LibTmux/X.pm »