NAME

Data::Transpose::Iterator::Scalar - Scalar iterator for Data::Transpose.

This iterator extends Data::Transpose::Iterator::Base, but as argument to the constructor accepts a arrayref with scalar values.

Internally, the records are kept and returned as hashrefs. You can set the key of the hashrefs with with the key method.

SYNOPSIS

my $iter = Data::Transpose::Iterator::Scalar->new([1, 2, 3, 4, 5]);
$iter->next;
# return { value => 1 };
$iter->key('string');
$iter->next;
# return { string => 2 };

ACCESSORS

key

Internally, the records are kept and returned as hashrefs. This accessor controls then name of the key.