debian man page for sort::key::types

Query: sort::key::types

OS: debian

Section: 3pm

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

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)
Related Man Pages
orddict(3erl) - linux
rdf::query::algebra::sort(3pm) - debian
sort::key(3pm) - debian
sort::key::natural(3pm) - debian
sort::key::types(3pm) - debian
Similar Topics in the Unix Linux Community
Beginner: Count &amp; Sort Using Array's
Ignore Header and Footer and Sort the data in fixed width file
Sort command help
Sort the files on their name and then the timestamp using Perl
Advanced: Sort, count data in column, append file name