develooper Front page | perl.perl5.porters | Postings from April 2010

Re: RFC: Perl manual pages -- update to follow the perlstyle.pod guidelines

Thread Previous | Thread Next
From:
Tom Christiansen
Date:
April 6, 2010 07:18
Subject:
Re: RFC: Perl manual pages -- update to follow the perlstyle.pod guidelines
Message ID:
3478.1270563465@chthon
In-Reply-To: Message from Nicholas Clark <nick@ccl4.org>
   of "Tue, 06 Apr 2010 13:52:19 BST." 
   <20100406125219.GT9998@plum.flirble.org>

>> BTW, the reason why examples like this:
>> 
>>    #  0    1    2     3     4    5     6     7     8
>>    ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
>>                                                localtime(time);
>> 
>> are *not* written
>> 
>> 
>>    # 0     1     2      3      4     5      6      7      8
>>    ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
>>                                                localtime(time);
>> 
>> is due to the default nroff line length.

> What is the default nroff line length?

It depends on your system, but it's often 6.5i.  On others, 
it may be determined by your screen size.

A good rule of thumb is to try to keep the total line, including
the leading whitespace indent that the -man macros add, to under
80 columns in nroff.

If you set your terminal to 80 columns wide, you can see the
wraps pretty quickly.  It doesn't look so good.

This checks for those and reports which lines are too long and by
how much, after discarding the overstrikes:

 nroff -man file | perl -nle 's/.\cH//g; print length," $.: $_" if length>79'

> And do we have any sort of Pod linter in core that will warn if our
> preformatted sections are "too" wide, such that they'd render to badly
> formatted man page?

podchecker?

--tom

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