NAME
Data::Maker::Field::Initials - A Data::Maker field class that generates its data from the initials of either the the value of a single field, or the value of multiple fields, previously determined in the same record. This class is a subclass of Data::Maker::Field::Code.
SYNOPSIS
use Data::Maker;
use Data::Maker::Field::Person::FirstName;
use Data::Maker::Field::Person::LastName;
my $maker = Data::Maker->new(
record_count => 10,
fields => [
{
name => 'firstname',
class => 'Data::Maker::Field::Person::FirstName'
},
{
name => 'lastname',
class => 'Data::Maker::Field::Person::LastName'
},
{
name => 'initials',
class => 'Data::Maker::Field::Initials',
args => {
from_field_set => [ 'firstname', 'lastname']
}
},
]
);
DESCRIPTION
Data::Maker::Field::Initials takes one of two arguments:
- from_field NAME
-
Takes the name of the field from which the initials will be derived, based on the first letter of each word of the last value generated for the named field.
- from_field ARRAYREF
-
Takes the a list of fields from which the initials will be derived, based on the first letters of the last values generated for each field in the list.
AUTHOR
John Ingram (john@funnycow.com)
LICENSE
Copyright 2010 by John Ingram. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.