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