NAME
Data::Transpose::Group - Group class for Data::Transpose
SYNOPSIS
$group = $tp->group('fullname', $tp->field('firstname'),
$tp->field('lastname'));
METHODS
new
$group = Data::Transpose::Group->new(name => 'mygroup',
objects => [$field_one, $field_two]);
name
Set name of the group:
$group->name('fullname');
Get name of the group:
$group->name;
objects
Passed only to the constructor. Arrayref with the field objects.
fields
Returns field objects for this group:
$group->fields;
join
Set string for joining field values:
$group->join(',');
Get string for joining field values:
$group->join;
The default string is a single blank character.
value
Returns value for output:
$output = $group->value;
With undefined argument, does not set the output to undef (because a group always output a string), but apply the joining.
With a defined argument, does not perform the joining, but set the output value.
target
Set target name for target operation:
$group->target('name');
Get target name:
$group->target;
LICENSE AND COPYRIGHT
Copyright 2012-2016 Stefan Hornburg (Racke) <racke@linuxia.de>.
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.