Name : perl-Text-Tree-Indented
| |
Version : 0.02
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp156.1.1
| Date : 2024-07-03 19:14:07
|
Group : Unspecified
| Source RPM : perl-Text-Tree-Indented-0.02-lp156.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.6/noarch |