| 1 | package Acme::CPANModules::DataStructureWalker; | ||
| 2 | |||
| 3 | 1 | our $DATE = '2019-06-30'; # DATE | |
| 4 | 1 | our $VERSION = '0.002'; # VERSION | |
| 5 | |||
| 6 | 1 | our $LIST = { | |
| 7 | summary => "Modules that traverse your data structure", | ||
| 8 | description => <<'_', | ||
| 9 | |||
| 10 | This list catalogs modules that let you traverse your data structure by visiting | ||
| 11 | each node/item: each element of an array, each key/value pair of a hash, | ||
| 12 | recursively. Sort of like <pm:File::Find> for your data instead of filesystem. | ||
| 13 | These modules can be used for searching or modifying your data. | ||
| 14 | |||
| 15 | Many modules in this list mimic Perl's `map` interface, for example: | ||
| 16 | <pm:Data::Rmap>, <pm:Data::Dmap>, <pm:Data::Traverse>. The difference among | ||
| 17 | these modules lies in the details: in how you specify option to skip unsupported | ||
| 18 | types of references, or whether some let you control the recursion (e.g. | ||
| 19 | Data::Rmap's and Data::Dmap's `cut`), | ||
| 20 | |||
| 21 | <pm:Data::Walk> models its interface on File::Find. It lets you choose whether | ||
| 22 | you want to go depth-first or breadth-first. | ||
| 23 | |||
| 24 | Benchmarks for these modules coming soon. | ||
| 25 | |||
| 26 | Related modules: | ||
| 27 | |||
| 28 | <pm:Data::Clean> can be used to clean/sanitize your data structure more | ||
| 29 | performantly compared to your manual walking (e.g. using Data::Rmap). It works | ||
| 30 | by generating Perl code specifically for your cleaning needs. | ||
| 31 | |||
| 32 | _ | ||
| 33 | entries => [ | ||
| 34 | {module => 'Data::Rmap'}, | ||
| 35 | {module => 'Data::Dmap'}, | ||
| 36 | {module => 'Data::Visitor'}, | ||
| 37 | {module => 'Data::Transformer'}, | ||
| 38 | {module => 'Data::Traverse'}, | ||
| 39 | {module => 'Data::Leaf::Walker'}, | ||
| 40 | {module => 'Data::Walk'}, | ||
| 41 | |||
| 42 | {module => 'Data::Clean'}, | ||
| 43 | ], | ||
| 44 | }; | ||
| 45 | |||
| 46 | 1 | 1; | |
| 47 | # ABSTRACT: Modules that traverse your data structure | ||
| 48 | |||
| 49 | __END__ |