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

HTML::TextArrayGenerator - Easy generation of a HTML array

SYNOPSIS

Here's some examples :

      use HTML::TextArrayGenerator;
      
      my $gen = TextArrayGenerator->new;

      $gen->set(0, 0, title => "First");
      $gen->set(0, 1, title => "Second");
      $gen->set(1, 1, text => "first sentence", align => "center");
      $gen->set(1, 1, text => "second sentence", link => "www.perldoc.com");

      $gen->generate_page (\*STDOUT, title => "Title of the page", array_title => "A title...", border => 10);
      $gen->generate_array(\*STDOUT,  border => 10);

DESCRIPTION

There are three functions for generating an HTML array.

TextArrayGenerator::set($x, $y, %hash)

Use the set method to build your array. The first and second argument are the coordinates of a case in the array. The third argument is a hash. Possible keys are : title, text, link and align.

TextArrayGenerator::generate_array($FILE_DESCRIPTOR, %hash)

Output the HTML code for your array. The second argument is a hash. The only key is border, which set the size of the border of the HTML array.

TextArrayGenerator::generate_page($FILE_DESCRIPTOR, %hash)

Output an HTML page which contains the HTML array. The second argument is a hash. Possible keys are : title, array_title and border. Title is the title of the HTML page and array_title the title of the array.

AUTHOR

Kototama <codeur(at)altern.org>

Copyright

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