Text::UnicodeBox

Text box drawing using the Unicode box symbols
Download

Text::UnicodeBox Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Eric Waters
  • Publisher web site:
  • http://search.cpan.org/~ewaters/

Text::UnicodeBox Tags


Text::UnicodeBox Description

Text::UnicodeBox is a low level box drawing interface in Perl. You'll most likely want to use one of the higher level modules such as Text::UnicodeBox::Table.The unicode box symbol table (http://en.wikipedia.org/wiki/Box-drawing_character) is a fairly robust set of symbols that allow you to draw lines and boxes with monospaced fonts. This module allows you to focus on the content of the boxes you need to draw and mostly ignore how to draw a good looking box with proper connections between all the lines.The low level approach is line-based. A box object is created, add_line is called for each line of content you'd like to render, and render is called to complete the box.Output is built up over time, which allows you to stream the output rather then buffering it and printing it in one go.SYNOPSIS use Text::UnicodeBox; use Text::UnicodeBox::Control qw(:all); my $box = Text::UnicodeBox->new(); $box->add_line( BOX_START( style => 'double', top => 'double', bottom => 'double' ), ' ', BOX_END(), ' ', BOX_START( style => 'heavy', top => 'heavy', bottom => 'heavy' ), ' ', BOX_END() ); print $box->render(); # Renders: # ╔═══╗ ┏━━━┓ # ║ ║ ┃ ┃ # ╚═══╝ ┗━━━┛Product's homepage


Text::UnicodeBox Related Software