EO::Pair - simple pairs for EO.
use EO::Pair; my $pair = EO::Pair->new(); $pair->key( 'foo' ); $pair->value( 'bar' ); $pair->do( sub { print $_->key } );
EO::Pair provides a simple pair to EO. It is used by the EO::Hash class primarily.
EO::Pair
EO::Pair inherits from EO::Array and provides any constructors that EO::Array does.
The key method gets and sets the key name of the pair. This is the zeroth element in the array.
The value method gets and sets the value of the pair. This is the first\ element in the array.
Runs the coderef passed by CODE. Sets $_ and the first argument to CODE as the pair object.
James A. Duncan <jduncan@fotango.com>
Copyright 2004 Fotango Ltd. All Rights Reserved.
This module is released under the same terms as Perl itself.
To install EO, copy and paste the appropriate command in to your terminal.
cpanm
cpanm EO
CPAN shell
perl -MCPAN -e shell install EO
For more information on module installation, please visit the detailed CPAN module installation guide.