Chia-liang Kao (高嘉良) > Text-Thread-0.2 > Text::Thread

Download:
Text-Thread-0.2.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.2   Source  

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::formatthread
        ('child', 'threadtitle', 'title', \@tree);

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

DESCRIPTION ^

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

formatthread 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.

BUGS ^

It doesn't work if the depth of the tree is more than 32.

AUTHORS ^

Chia-liang Kao <clkao@clkao.org>

COPYRIGHT ^

Copyright 2001,2006 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

syntax highlighting: