develooper Front page | perl.perl5.porters | Postings from June 2022

Re: Pre-RFC: tables in Pod

Thread Previous | Thread Next
From:
Tomasz Konojacki
Date:
June 17, 2022 23:46
Subject:
Re: Pre-RFC: tables in Pod
Message ID:
20220618014632.6723.5C4F47F8@xenu.pl
On Thu, 16 Jun 2022 23:02:39 +0100
Neil Bowers <neilb@neilb.org> wrote:

> I’m curious: requested where? I couldn’t find much discussion / requests online for tables in pod. Doesn’t mean it hasn’t happened. I just don’t remember it being asked for.

I guess indeed there probably wasn't anyone formally asking for it, but:

1. There are at least two Pod extensions that add tables (PseudoPod,
Pod6).

2. Despite being poorly documented and not working in non-HTML renderers,
plenty of distributions use the "=begin HTML" hack for tables (and
images).

3. Competing markup formats often include tables. Vanilla Markdown
doesn't have tables, but there are countless extensions that add them.
That indicates it's a pretty popular feature.
 
> Would cell contents be auto wrapped, or would every cell be treated as nowrap? If so, how would wide tables be handled when looking a pod in a tty with perldoc? Would they just be rendered wide, and thus the individual lines would wrap?

I think that should be left to the renderer. As I said in the images
thread, each of them has completely different constraints.

> If I wanted to include a table in pod, I’d probably format an ascii table either by hand, or using one of the modules on CPAN, and put it in a verbatim paragraph. With the format proposed, a lot of the time you’re almost
> formatting the table anyway, so what’s the delta benefit of supporting a table capability over that?

The main benefits are: 

1. Not looking completely terrible and out of place in non-plain-text
renderers (metacpan, github).

2. The ability to use formatting codes inside tables, including the
proposed image tag.

3. "Real" tables won't have fixed width.

> Raku’s pod supports tables – how much is this capability used? I tried a quick search, but couldn’t find any documentation using tables (but I’m not familiar with the Raku ecosystem, so I could easily have missed a bunch).

I don't know about Raku, but you can find plenty of tables made with
"=begin HTML" on CPAN. For example:

https://metacpan.org/release/MATY/PMLTQ-Commands-2.0.3/view/lib/PMLTQ/Commands.pm#Commands-and-options

https://metacpan.org/release/KIMOTO/SPVM-0.9608/view/lib/SPVM/Document/Tutorial.pm#Numeric-Types

https://metacpan.org/release/BKB/HTML-Make-Calendar-0.01/view/lib/HTML/Make/Calendar.pm#SYNOPSIS

https://metacpan.org/release/CHAMAS/Apache-ASP-2.63/view/ASP.pm#CacheDB

Not to mention countless ASCII-art tables.



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About