Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sort::key::types(3pm) [debian man page]

Sort::Key::Types(3pm)					User Contributed Perl Documentation				     Sort::Key::Types(3pm)

NAME
Sort::Key::Types - handle Sort::Key data types SYNOPSIS
use Sort::Key::Types qw(register_type); register_type(Color => sub { $_->R, $_->G, $_->B }, qw(int, int, int)); # you better # use Sort::Key::Register ... DESCRIPTION
The Sort::Key family of modules can be extended to support new key types using this module (or the more friendly Sort::Key::Register). FUNCTIONS The following functions are provided: Sort::Key::register_type($name, &gensubkeys, @subkeystypes) registers a new datatype named $name defining how to convert it to a multikey. &gensubkeys should convert the object of type $name passed on $_ to a list of values composing the multikey. @subkeystypes is the list of types for the generated multikeys. For instance: Sort::Key::Types::register_type 'Person', sub { $_->surname, $_->name, $_->middlename }, qw(str str str); Sort::Key::Types::register_type 'Color', sub { $_->R, $_->G, $_->B }, qw(int int int); Once a datatype has been registered it can be used in the same way as types supported natively, even for defining new types, i.e.: Sort::Key::Types::register_type 'Family', sub { $_->father, $_->mother }, qw(Person Person); SEE ALSO
Sort::Key, Sort::Key::Merger, Sort::Key::Register. COPYRIGHT AND LICENSE
Copyright (C) 2005-2007 by Salvador Fandin~o, <sfandino@yahoo.com>. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available. perl v5.14.2 2012-06-30 Sort::Key::Types(3pm)

Check Out this Related Man Page

ssl_session_cache_api(3erl)				     Erlang Module Definition				       ssl_session_cache_api(3erl)

NAME
ssl_session_cache_api - Defines the API for the TLS session cache so that the data storage scheme can be replaced by defining a new callback module implementing this API. COMMON DATA TYPES
The following data types are used in the functions below: cache_ref() = opaque() key() = {partialkey(), session_id()} partialkey() = opaque() session_id() = binary() session() = opaque() EXPORTS
delete(Cache, Key) -> _ Types Cache = cache_ref() Key = key() Deletes a cache entry. Will only be called from the cache handling process. foldl(Fun, Acc0, Cache) -> Acc Types Calls Fun(Elem, AccIn) on successive elements of the cache, starting with AccIn == Acc0. Fun/2 must return a new accumulator which is passed to the next call. The function returns the final value of the accumulator. Acc0 is returned if the cache is empty. init() -> opaque() Types Performs possible initializations of the cache and returns a reference to it that will be used as parameter to the other api func- tions. Will be called by the cache handling processes init function, hence putting the same requirements on it as a normal process init function. lookup(Cache, Key) -> Entry Types Cache = cache_ref() Key = key() Entry = session() | undefined Looks up a cache entry. Should be callable from any process. select_session(Cache, PartialKey) -> [session()] Types Cache = cache_ref() PartialKey = partialkey() Session = session() Selects sessions that could be reused. Should be callable from any process. terminate(Cache) -> _ Types Cache = term() - as returned by init/0 Takes care of possible cleanup that is needed when the cache handling process terminates. update(Cache, Key, Session) -> _ Types Cache = cache_ref() Key = key() Session = session() Caches a new session or updates a already cached one. Will only be called from the cache handling process. Ericsson AB ssl 4.1.4 ssl_session_cache_api(3erl)
Man Page