James A. Duncan > EO-0.96 > EO::Pair

Download:
EO-0.96.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.96   Source  

NAME ^

EO::Pair - simple pairs for EO.

SYNOPSIS ^

  use EO::Pair;

  my $pair = EO::Pair->new();
  $pair->key( 'foo' );
  $pair->value( 'bar' );
  $pair->do( sub { print $_->key } );

DESCRIPTION ^

EO::Pair provides a simple pair to EO. It is used by the EO::Hash class primarily.

CONSTRUCTORS ^

EO::Pair inherits from EO::Array and provides any constructors that EO::Array does.

METHODS ^

key( [KEYNAME] )

The key method gets and sets the key name of the pair. This is the zeroth element in the array.

value( [VALUE] )

The value method gets and sets the value of the pair. This is the first\ element in the array.

do( CODE )

Runs the coderef passed by CODE. Sets $_ and the first argument to CODE as the pair object.

AUTHOR ^

James A. Duncan <jduncan@fotango.com>

COPYRIGHT ^

Copyright 2004 Fotango Ltd. All Rights Reserved.

This module is released under the same terms as Perl itself.