Data::Freq::Field - Controls counting with Data::Freq at each level
Version 0.04
Usage:
Data::Freq::Field->new({ type => 'text' , # { 'text' | 'number' | 'date' } sort => 'count', # { 'value' | 'count' | 'first' | 'last' } order => 'desc' , # { 'asc' | 'desc' } pos => 0 , # { 0 | 1 | 2 | -1 | -2 | .. | [0, 1, 2] | .. } key => 'mykey', # { any key(s) for input hash refs } convert => sub {...}, });
Constructs a field object.
See "field specification" in Data::Freq for details.
Usage:
my $field = Data::Freq::Field->new(...); my $record = Data::Freq::Record->new(...); my $normalized_text = $field->evaluate_record($record);
Evaluates an input record as a normalized text that will be used for frequency counting, depending on the parameters passed to the new() method.
This is intended to be an internal method for Data::Freq.
Usage:
my $raw_node_list = [values %{$parent_node->children}]; my $sorted_node_list = $field->select_nodes($raw_node_list);
Sorts and reduces a list of nodes (Data::Freq::Node) at the corresponding depth in the frequency tree, depending on the parameters passed to the new() method.
This is intended to be an internal method for Data::Freq.
Retrieves the type
parameter.
Retrieves the aggregate
parameter.
Retrieves the sort
parameter.
Retrieves the order
parameter.
Retrieves the pos
parameter as an array ref.
Retrieves the key
parameter as an array ref.
Retrieves the limit
parameter.
Retrieves the offset
parameter.
Retrieves the strftime
parameter (POSIX::strftime()).
Retrieves the convert
parameter.
Mahiro Ando, <mahiro at cpan.org>
Copyright 2012 Mahiro Ando.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.