...
The keys correspond to the affiliation.name column in the database. The values represent the addresses (phony) of Windows Vista/2008 KMS activation servers.
This hash is serialized by DataStructure.pm::set_variable() using the YAML module's Dump function which transforms the hash into:
...
id | name | value | setby | timestamp |
---|---|---|---|---|
2 | kms-configuration | --- | new.pm:139 | 2009-05-26 11:35:36 |
To retrieve the data:
Code Block |
---|
my %kms_configuration = $self->data->get_variable('kms-configuration');my $kms_address = $kms_configuration->{$affiliation_id};
|
A more elaborate data structure is created in Perl containing an array of hashes. One of the hash values (email) can be multivalued because the value is an anonymous array:
Code Block |
---|
my @contacts = ( { 'firstname' => 'Joe', 'lastname' => 'Doe', 'email' => ['joe@somewhere.org', 'jdoe22@unity.ncsu.edu'], 'employee_id' => 3342 }, { 'firstname' => 'Jane', 'lastname' => 'Doe', 'email' => ['jane@somewhere.org'], 'employee_id' => 7865 } ); $self->data->set_variable('contacts', \@contacts); |
DataStructure.pm::set_variable() uses YAML::Dump transforms to transform this data structure into:
...