Name : perl-Text-Tree-Indented
| |
Version : 0.02
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp155.1.1
| Date : 2023-07-20 18:55:03
|
Group : Unspecified
| Source RPM : perl-Text-Tree-Indented-0.02-lp155.1.1.src.rpm
|
Size : 0.03 MB
| |
Packager : https://www_suse_com/
| |
Summary : Render a tree data structure in the classic indented view
|
Description :
This module provides a single function, \'generate_tree\', which takes a perl data structure and renders it into an indented tree view.
*Note*: the design of this module is still very much in flux, so the data structure and other aspects may change from release to release.
The tree data is passed as an arrayref. A string in the arrayref represents a node in the tree; if it\'s followed by an arrayref, that\'s a subtree. So let\'s say the root of your tree is *Fruit*, and it has three children, *Apples*, *Bananas*, and *Oranges*, then the data would look like this:
my $tree = [\'Fruit\', [\'Apples\', \'Bananas\', \'Oranges\'] ];
This results in the following tree:
Fruit ├─Apples ├─Bananas └─Oranges
Now you want to add in Red Bananas and Williams Bananas, so your data becomes:
my $tree = [\'Fruit\', [\'Apples\', \'Bananas\', [\'Red\', \'Williams\'], \'Oranges\'] ];
And now the tree looks like this:
Fruit ├─Apples ├─Bananas │ ├─Red │ └─Williams └─Oranges
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-T/15.5/noarch |