Hi Chris,

Chris Bennett wrote on Tue, Nov 02, 2010 at 04:17:25PM -0500:

> Interested in the new mandoc changes,

Nice to hear that.
Feedback is always welcome.

> I was looking at a perl script I have with pod in it.
> 
> perldoc script.pl produces a good output.
> 
> perldoc manpage says perldoc is equivalent to:
> pod2man script.pl | nroff -man | $PAGER
> 
> but that produces a very ugly and wrong output.
> 
> Is the perldoc manpage in error or has nroff been changed?

Unfortunately, you are not saying how you set up the system
showing these symptoms.  Is it a fresh install from a snapshot
after the groff removal from base?  Or is it an older system
upgraded with a recent snapshot?  In the latter case, groff
could still be around, unless you have deleted it manually.
Note that groff consists of lots of programs, so even if you
have deleted some, others may still be there.

Here are a few commands that help finding out the state of
your system:

 $ which nroff   # tells you whether you have groff in base,
                 # in ports, or not at all
 $ troff -v /dev/null   # tells you which version of groff
 $ export PERLDOCDEBUG=1   # tells perldoc(1) to produce diagnostics
 $ perldoc /usr/src/gnu/usr.bin/perl/pod/perl.pod

The latter will - in addition to the paged output -
print something like this, which you can see after
exiting the pager:

[...]
'find_good_formatter_class: Will format with the class Pod::Perldoc::ToMan
'grand_search_init: Searching for /usr/src/gnu/usr.bin/perl/pod/perl.pod
'grand_search_init: Found as /usr/src/gnu/usr.bin/perl/pod/perl.pod
About to run /usr/bin/pod2man  --lax /usr/src/gnu/usr.bin/perl/pod/perl.pod \
  | mandoc -man
filter_nroff isn't set, so not filtering.
Finished writing to /tmp/BavzqD06XL.
'page: About to try calling /usr/bin/less /tmp/BavzqD06XL

That should give you a better idea what is happening.
Note the "mandoc" in there, that's coming from

  /usr/libdata/perl5/Pod/Perldoc.pm
  sub options_processing
  $self->opt_n("mandoc") unless $self->opt_n;

Unfortunately, you are not showing any actual output,
nor the input file you are using for testing purposes,
so i have no idea what might be happening...

Yours,
  Ingo

Reply via email to