1#!/usr/bin/env perl 2 3use strict; 4use warnings; 5 6use Text::Table::Manifold ':constants'; 7 8# ----------- 9 10my($table) = Text::Table::Manifold -> new 11( 12 alignment => 13 [ 14 align_left, 15 align_center, 16 align_right, 17 align_center, 18 ] 19); 20 21$table -> headers(['Homepage', 'Country', 'Name', 'Metadata']); 22$table -> data( 23[ 24 ['http://savage.net.au/', 'Australia', 'Ron Savage', undef], 25 ['https://duckduckgo.com/', 'Earth', 'Mr. S. Engine', ''], 26]); 27 28# Note: Save the data, since render() may update it. 29 30my(@data) = @{$table -> data}; 31 32$table -> empty(empty_as_text); 33$table -> pass_thru({new => {-style => 'color: blue'} }); 34$table -> undef(undef_as_text); 35 36print "Format: format_html_table: \n"; 37print join("\n", @{$table -> render(format => format_html_table)}), "\n"; 38print "\n"; 39 40# Note: Restore the saved data. 41 42$table -> data([@data]); 43 44# Etc. 45