Jerome Eteve > Form-Toolkit-0.007 > Form::Toolkit::KVPairs

Download:
Form-Toolkit-0.007.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.007   Source   Latest Release: Form-Toolkit-0.008

NAME ^

Form::Toolkit::KVPairs - An abstract source of Key Value Pairs.

size

Gives the size of the Key Value Pairs set.

Usage:

  there is $this->size() key-value pairs in this Set.

lookup

Looks up the key in the Set and return undef if not found, or the value.

usage:

  if( my $value = $this->lookup($key) ){

  }

next_kvpair

Returns () or the next ( key => value ) tuple of this set. Calling that turns this source into an iterator.

So you can do:

while( my @kv = $this->next_kvpair() ){ print "Key,value: ".join(',' , @kv); }

syntax highlighting: