package HTML::TableTiler ; $VERSION = 1.21 ; use strict ; # This file uses the "Perlish" coding style # please read http://perl.4pro.net/perlish_coding_style.html ; use 5.005 ; use Carp ; use HTML::PullParser 1.0 ; use IO::Util 1.2 ; require Exporter ; @HTML::TableTiler::ISA = qw| Exporter | ; @HTML::TableTiler::EXPORT_OK = qw| tile_table | ; BEGIN { *PULL = sub () { 'PULL' } ; *TILE = sub () { 'TILE' } ; *TRIM = sub () { 'TRIM' } ; *TRUE = sub () { 1 } ; *FALSE = sub () { 0 } ; *RESET = sub () { 0 } } ; sub new { my $c = shift ; my $t = shift || \ '
| a optional placeholder | another optional placeholder |
| Balls | A470 | 250 | 2.75 |
| Cubes | A520 | 378 | 3.25 |
| Cones | A665 | 186 | 2.85 |
All the examples use the code below:
| common code for all the examples | |
01 |
|
See tile and modes in each example to understand how both work in combination.Placeholders are optional, but very useful to preview the final result.
| Descr. | Item | Quant. | Cost | Price |
| Balls | A001 | 101 | 2.75 | 4.95 |
| Cubes | A002 | 102 | 3.75 | 5.95 |
| Cones | A003 | 103 | 4.75 | 6.75 |
| Tubes | A004 | 104 | 5.75 | 7.95 |
Tile: undef (default: '<table><tr><td></td></tr></table>')
Modes: not allowed with default tile
| Descr. | Item | Quant. | Cost | Price |
| Balls | A001 | 101 | 2.75 | 4.95 |
| Cubes | A002 | 102 | 3.75 | 5.95 |
| Cones | A003 | 103 | 4.75 | 6.75 |
| Tubes | A004 | 104 | 5.75 | 7.95 |
Tile:
| placeholder |
| placeholder |
Modes: undef (default: H_PULL V_PULL)
| Descr. | Item | Quant. | Cost | Price |
| Balls | A001 | 101 | 2.75 | 4.95 |
| Cubes | A002 | 102 | 3.75 | 5.95 |
| Cones | A003 | 103 | 4.75 | 6.75 |
| Tubes | A004 | 104 | 5.75 | 7.95 |
Tile:
| placeholder |
| placeholder |
Modes: V_TILE (default: H_PULL)
| Descr. | Item | Quant. | Cost | Price |
| Balls | A001 | 101 | 2.75 | 4.95 |
| Cubes | A002 | 102 | 3.75 | 5.95 |
| Cones | A003 | 103 | 4.75 | 6.75 |
| Tubes | A004 | 104 | 5.75 | 7.95 |
Tile:
| placeholder | placeholder |
Modes: undef (default: H_PULL V_PULL)
| Descr. | Item | Quant. | Cost | Price |
| Balls | A001 | 101 | 2.75 | 4.95 |
| Cubes | A002 | 102 | 3.75 | 5.95 |
| Cones | A003 | 103 | 4.75 | 6.75 |
| Tubes | A004 | 104 | 5.75 | 7.95 |
Tile:
| placeholder | placeholder |
Modes: H_TILE (default: V_PULL)
| Descr. | Item | Quant. | Cost | Price |
| Balls | A001 | 101 | 2.75 | 4.95 |
| Cubes | A002 | 102 | 3.75 | 5.95 |
| Cones | A003 | 103 | 4.75 | 6.75 |
| Tubes | A004 | 104 | 5.75 | 7.95 |
Tile:
| placeholder | placeholder |
| placeholder | placeholder |
Modes: H_TILE V_TILE
| Descr. | Item | Quant. | Cost | Price |
| Balls | A001 | 101 | 2.75 | 4.95 |
| Cubes | A002 | 102 | 3.75 | 5.95 |
| Cones | A003 | 103 | 4.75 | 6.75 |
| Tubes | A004 | 104 | 5.75 | 7.95 |
Tile:
| placeholder | placeholder |
| placeholder | placeholder |
Modes: undef (default: H_PULL V_PULL)