Data-TableReader-Decoder-HTML

 view release on metacpan or  search on metacpan

lib/Data/TableReader/Decoder/HTML.pm  view on Meta::CPAN



has _tables => ( is => 'lazy' );
sub parse {
	shift->_tables;
	return 1;
}

sub _build__tables {
	my $self= shift;
	# TODO: determine encoding from BOM, or from meta-equiv while parsing...
	binmode $self->file_handle;
	return $self->_parse_html_tables($self->file_handle);
}

sub _parse_html_tables {
	my ($self, $handle)= @_;
	# These variables track the state of the HTML parse.
	# cur_row is only defined when we are in a table row, and $cur_cell
	# is a scalar ref only defined when we are in a cell.
	my (@tables, $cur_table, $cur_row, $cur_cell);



( run in 0.329 second using v1.01-cache-2.11-cpan-f29a10751f0 )