The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
use 5.014;
use strict;
use Test::More tests => 12;

use Var::Pairs;

my $data_ref = ['a'..'f'];

for my $next (pairs $data_ref) {
    state $count = 0;
    ok $next->index   == $count              => 'index method correct';
    ok $next->value   eq $data_ref->[$count] => 'value method correct';
    $count++;
}