GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
DataStruct::Flat(3) User Contributed Perl Documentation DataStruct::Flat(3)

DataStruct::Flat - Convert a data structure into a one level list of keys and values

  use 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'
  # };

This module converts a nested Perl data structure into a one level hash of keys and values apt for human consumption.

Constructor. Initializes the flattener object

Returns a hashref for $struct which contains keys with dotted "paths" to the respective values in the datastructure.

The source code is located here: https://github.com/pplu/datastruct-flat

Hash::Flatten

Copyright (c) 2019 by CAPSiDE

Apache 2.0

2019-02-08 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.