GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  TREE::SIMPLE::VIEW::ASCII (3)

.ds Aq ’

NAME

Tree::Simple::View::ASCII - A class for viewing Tree::Simple hierarchies in ASCII

CONTENTS

SYNOPSIS



  use Tree::Simple::View::ASCII;
 
  my $tree_view = Tree::Simple::View::ASCII->new($tree);
 
  $tree_view->includeTrunk(1);
 
  print $tree_view->expandAll();
 
  # root
  #     |---Node Level: 1
  #     |       |---Node Level: 1.1
  #     |       |---Node Level: 1.2
  #     |       |       |---Node Level: 1.2.1
  #     |       |       |---Node Level: 1.2.2
  #     |       |---Node Level: 1.3
  #     |---Node Level: 2
  #     |       |---Node Level: 2.1
  #     |       |---Node Level: 2.2
  #     |---Node Level: 3
  #     |       |---Node Level: 3.1
  #     |               |---Node Level: 3.1.1
  #     |               |---Node Level: 3.1.2
  #     |---Node Level: 4
  #             |---Node Level: 4.1

  print $tree_view->expandPath("root", "Node Level: 1", "Node Level: 1.2");

  # root
  #     |---Node Level: 1
  #     |       |---Node Level: 1.1
  #     |       |---Node Level: 1.2
  #     |       |       |---Node Level: 1.2.1
  #     |       |       |---Node Level: 1.2.2
  #     |       |---Node Level: 1.3
  #     |---Node Level: 2
  #     |---Node Level: 3
  #     |---Node Level: 4



DESCRIPTION

This is a Tree::Simple::View subclass which provides simple ASCII formatting for trees.

I had this code lying around, and I figured it was best to put it into here. This is an early release of this, and it lacks configuration parameter handling, but that can be easily added later when I need it.

METHODS

<B>expandAllSimpleB> This will draw a fully expanded tree.
<B>expandAllComplexB> This currently is aliased to the expandAllSimple since we don’t have config handling.
<B>expandPathSimple (@path)B> This will draw a tree with the given @path expanded.
<B>expandPathComplexB> This currently is aliased to the expandPathSimple since we don’t have config handling.

TODO

Config handling, allowing you to customize the drawing. Patches welcome, I just don’t currently have the time to add it.

BUGS

None that I am aware of. Of course, if you find a bug, let me know, and I will be sure to fix it.

AUTHOR

stevan little, <stevan@iinteractive.com>

COPYRIGHT AND LICENSE

Copyright 2004-2008 by Infinity Interactive, Inc.

<http://www.iinteractive.com>

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

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 TREE::SIMPLE::VIEW::ASCII (3) 2008-02-12

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.