HTML::...:Table(3pm)

πŸ“¦
version 0.43 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– NAME πŸ’–

HTML::TableParser::Table β€” it's the support class for HTML::TableParser, bestie. Like, the little helper that does the heavy lifting behind the scenes. 🫢


✨ VERSION ✨

version 0.43 β€” that's the one, periodt.


🌸 DESCRIPTION 🌸

okay so picture this: this class is the one keeping track of everything to do with a table, and it's also the one building the info that gets passed back to your user callbacks. It's literally in charge of marshalling the massaged header and row data over to those callbacks. main character energy, honestly. πŸ’…

An instance gets created when the controlling TableParser class finds a <table tag. The object gets an id based on which table it's supposed to work on. Its methods get invoked from the TableParser callbacks when they run across an appropriate tag β€” that's tr, th, td. And then the object gets destroyed when the matching /table tag is found. gone. reduced to atoms. πŸ’€

Now β€” tables can be nested, so multiple HTML::TableParser::Table objects can exist at the same time. HTML::TableParser uses two pieces of information held by this class: ids and process. The first one is an array of table ids, one element per level of table nesting. The second is a flag saying whether this table is being processed (i.e. it matches a requested table) or being ignored. And because HTML::TableParser uses the ids info from an existing table to initialize a new table, it first creates an empty sentinel (place holder) table β€” by calling the HTML::TableParser::Table constructor with no arguments. no args, no problem. πŸŽ€

Also this class handles missing /tr, /td, and /th tags. Because of that β€” especially when it's handling multi-row headers β€” user callbacks may be slightly delayed (and data cached). It also handles rows with overlapping columns. iconic behavior, truly. ✨


🌈 METHODS 🌈

  • new
  • match_id
  • req_match_id
  • req_match_cols
  • match_hdr
  • match_req
  • callback
  • start_header
  • end_header
  • start_column
  • end_column
  • start_row
  • end_row
  • finish_header
  • fix_texts
  • text
  • id
  • ids
  • process

πŸ’€ BUGS πŸ’€

Please report any bugs or feature requests on the bugtracker website <https://rt.cpan.org/Public/Dist/Display.html?Name=HTML-TableParser> or by email to bug-HTML-TableParser@rt.cpan.org <mailto:bug-HTML-TableParser@rt.cpan.org>.

When you're submitting a bug or a request, please include a test-file or a patch to an existing test-file that illustrates the bug or the desired feature. like, help us help you, bestie πŸ™ˆ


πŸ¦‹ SOURCE πŸ¦‹

The development version is on github at <https://github.com/djerius/html-tableparser> and may be cloned from <git://github.com/djerius/html-tableparser.git>

go get it, it's giving open source excellence. πŸ”₯


πŸ‘‘ SEE ALSO πŸ‘‘

Please see those modules/websites for more information related to this module.

  • HTML::TableParser

πŸ’œ AUTHOR πŸ’œ

Diab Jerius <djerius@cpan.org>


This software is Copyright (c) 2018 by Smithsonian Astrophysical Observatory.

This is free software, licensed under:

The GNU General Public License, Version 3, June 2007

okay bestie that's the whole page πŸ’– this one's from the perl v5.26.1 manual set, dated 2018-03-25, filed under HTML::...:Table(3pm) β€” now go forth and parse some tables, you absolute legend. 🧚⭐🌸

πŸ“¦ where this page comes from