The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Text::Thread - format threaded items to ascii tree

SYNOPSIS

    use Text::Thread;

    my @tree = (
     { title => 'test1',
       child => [{ title => 'test2',
                   child => [{ title => 'test5' },
                             { title => 'test3'}]}]},
     { title => 'test4' } );

    my @list = Text::Thread::format
        ('child', 'threadtitle', 'title', \@tree)

    print "$_->{threadtitle}\n" foreach @seq;

DESCRIPTION

Text::Thread formats a tree structure into a ascii tree, which is often used in threaded mail and netnews reader.

format CHILD THREADTITLE TITLE TREE

format the given TREE. CHILD is the hash key for child nodes in the items in TREE. it could be either arrayref or hashref. THREADTITLE is the key for the output ascii tree in each node. TITLE is the thing to be put at the leaves of the tree.

AUTHORS

Chia-liang Kao <clkao@clkao.org>

COPYRIGHT

Copyright 2001 by Chia-liang kao <clkao@clkao.org>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html