![]() |
![]()
| ![]() |
![]()
NAMEDataStruct::Flat - Convert a data structure into a one level list of keys and values SYNOPSISuse DataStruct::Flat; my $flattener = DataStruct::Flat->new; my $flat = $flattener->flatten({ a => [ 7, 8, 9, 10 ], b => { c => d }, }); # $flat = { # 'a.0' => 7, # 'a.1' => 8, # 'a.2' => 9, # 'a.3' => 10, # 'b.c' => 'd' # }; DESCRIPTIONThis module converts a nested Perl data structure into a one level hash of keys and values apt for human consumption. METHODSnewConstructor. Initializes the flattener object flatten($struct)Returns a hashref for $struct which contains keys with dotted "paths" to the respective values in the datastructure. CONTRIBUTEThe source code is located here: https://github.com/pplu/datastruct-flat SEE ALSOHash::Flatten AUTHOR Jose Luis Martinez CPAN ID: JLMARTIN CAPSiDE jlmartinez@capside.com http://www.pplusdomain.netCOPYRIGHTCopyright (c) 2019 by CAPSiDE LICENSEApache 2.0
|