Skip Menu |

This queue is for tickets about the Pod-Perldoc CPAN distribution.

Report information
The Basics
Id: 73236
Status: resolved
Priority: 0/
Queue: Pod-Perldoc

People
Owner: bdfoy [...] cpan.org
Requestors: wyant [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 3.15_12
Fixed in: (no value)



Subject: Raw postscript output under Mac OS 10.5.8 Leopard and Ubuntu 10.4 Lucid. No output under OpenBSD 5.0
Thanks for the opportunity to test-drive the new Pod::Perldoc functionality. Under a couple different operating systems (none brand-new) the perldoc command gave me what looked like raw PDF. Scrolled. Additionally, it failed completely under OpenBSD 5.0, which is the current release. Everything but the Mac OS stuff was run under Oracle VirtualBox. I don't often call something 'Critical'; I'm using it in this case because under Ubuntu 10.04 and OpenBSD 5.0 the update appears to be unusable. Please let me know what further information I can provide. A comparison of the behavior under Mac OS 10.5 Leopard before and after upgrading groff, and of the behavior under Ubuntu 10.04 Lucid Lynx (the current Long Term Support release) and Ubuntu 11.10 Oneiric Ocelot (the current release) suggests that some helper application is involved, but I have no idea which one. --------------- Mac OS 10.5.8 Leopard ------------------- Mac OS 10.5.8 Leopard is no longer new (current is 10.7 Lion). Under this, perldoc warned You have an old groff. Update to version 1.20.1 to good Unicode support. If you don't upgrade, wide characters may come out oddly. at /usr/local/perl/5.15.5/lib/5.15.5/Pod/Perldoc.pm line 1325 $ groff -v GNU groff version 1.19.2 Copyright (C) 2004 Free Software Foundation, Inc. GNU groff comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of groff and its subprograms under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. called subprograms: GNU grops (groff) version 1.19.2 GNU troff (groff) version 1.19.2 I was able to get going by installing the Darwin Ports groff, which has a _bunch_ of dependencies, including ghostscript. Post-install I got $ groff -v GNU groff version 1.21 Copyright (C) 2009 Free Software Foundation, Inc. GNU groff comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of groff and its subprograms under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. called subprograms: GNU grops (groff) version 1.21 GNU troff (groff) version 1.21 Notwithstanding the fact that Darwin Ports says it installed ghostscript 9.04_1, there was no 'ghostscript' executable in my path either before or after the Darwin Ports installation. But it must be there because printing works. ----------------------- Ubuntu 10.04 Lucid Lynx ------------------- This is the current long-term-support version of Ubuntu. The perldoc command displayed what looked like raw postscript after upgrading to 3.15_12. $ groff -v GNU groff version 1.20.1 Copyright (C) 2009 Free Software Foundation, Inc. GNU groff comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of groff and its subprograms under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. called subprograms: GNU grops (groff) version 1.20.1 GNU troff (groff) version 1.20.1 $ ghostscript -v GPL Ghostscript 8.71 (2010-02-10) Copyright (C) 2010 Artifex Software, Inc. All rights reserved. Since I appeared to have the version of groff called for, I tried various permutations of the command line options (e.g. -oman) without being able to get anything but postscript. I finally force-installed Pod::Perldoc 3.15 to get myself going again. -------------------- Ubuntu 11.10 Oneiric Ocelot ------------------- Works beautifully.  $ groff -v GNU groff version 1.21 Copyright (C) 2009 Free Software Foundation, Inc. GNU groff comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of groff and its subprograms under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. called subprograms: GNU grops (groff) version 1.21 GNU troff (groff) version 1.21 $ ghostscript -v GPL Ghostscript 9.04 (2011-08-05) Copyright (C) 2011 Artifex Software, Inc. All rights reserved. ------------------------ OpenBSD 5.0 ---------------------------- This is the current OpenBSD, released November 1, 2011. $ perldoc perlfunc Can't exec "groff": No such file or directory at /usr/local/perl/5.14.2/lib/5.14.2/Pod/Perldoc/ToMan.pm line 161. Use of uninitialized value $version_string in pattern match (m//) at /usr/local/perl/5.14.2/lib/5.14.2/Pod/Perldoc/ToMan.pm line 162. Use of uninitialized value $version in concatenation (.) or string at /usr/local/perl/5.14.2/lib/5.14.2/Pod/Perldoc/ToMan.pm line 163. Use of uninitialized value $version in string lt at /usr/local/perl/5.14.2/lib/5.14.2/Pod/Perldoc/ToMan.pm line 166. You have an old groff. Update to version 1.20.1 to good Unicode support. If you don't upgrade, wide characters may come out oddly. at /usr/local/perl/5.14.2/lib/5.14.2/Pod/Perldoc.pm line 1325 Use of uninitialized value $version in string gt at /usr/local/perl/5.14.2/lib/5.14.2/Pod/Perldoc/ToMan.pm line 174. Error while formatting with Pod::Perldoc::ToMan: open3: exec of groff -man failed at /usr/local/perl/5.14.2/lib/5.14.2/Pod/Perldoc/ToMan.pm line 213 at /usr/local/perl/5.14.2/bin/perldoc line 9 Got a 0-length file from /usr/local/perl/5.14.2/lib/5.14.2/pod/perlfunc.pod via Pod::Perldoc::ToMan!? at /usr/local/perl/5.14.2/bin/perldoc line 9 A force install of Pod::Perldoc got me raw POD output, with the warning 'sh: nroff: not found'. I suppose this is what I got before I installed Pod-Perldoc-3.15_12, but to tell the truth I don't use OpenBSD much, and can't actually remember.
Forgot a key piece of information: The Mac OS 10.5 Leopard tests were done under Perl 5.15.5. All others were done under Perl 5.14.2.
Why do you think it's PostScript? Please include the commands you ran, the actual output you got, and any PERL* environment settings you might have. Which Perl versions are you using?
On Tue Dec 13 22:16:15 2011, BDFOY wrote: Show quoted text
> Why do you think it's PostScript? Please include the commands you ran, > the actual output you > got, and any PERL* environment settings you might have. Which Perl > versions are you using?
From Ubuntu 10.04 (Long Term Support) Lucid Lynx: Command: $ perldoc perlfunc Output (first 20 lines or so - entire output attached): %!PS-Adobe-3.0 %%Creator: groff version 1.20.1 %%CreationDate: Tue Dec 13 23:36:43 2011 %%DocumentNeededResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Courier %%+ font Courier-Oblique %%+ font Courier-Bold %%DocumentSuppliedResources: procset grops 1.20 1 %%Pages: 105 %%PageOrder: Ascend %%DocumentMedia: Default 612 792 0 () () %%Orientation: Portrait %%EndComments %%BeginDefaults %%PageMedia: Default %%EndDefaults %%BeginProlog %%BeginResource: procset grops 1.20 1 %!PS-Adobe-3.0 Resource-ProcSet /setpacking where{ Environment: $ printenv ORBIT_SOCKETDIR=/tmp/orbit-tom SSH_AGENT_PID=1208 TERM=xterm SHELL=/bin/bash XDG_SESSION_COOKIE=ff13eeb0437b7203691d1cca4e400ed1-1323837294.346502-2089201608 WINDOWID=12582915 GNOME_KEYRING_CONTROL=/tmp/keyring-iyBlck GTK_MODULES=canberra-gtk-module USER=tom LS_COLORS=rs=0:di=01;34:ln=01;36:hl=44;37:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36: SSH_AUTH_SOCK=/tmp/keyring-iyBlck/ssh DEFAULTS_PATH=/usr/share/gconf/gnome.default.path SESSION_MANAGER=local/ubuntu-1004:@/tmp/.ICE-unix/1141,unix/ubuntu-1004:/tmp/.ICE-unix/1141 USERNAME=tom XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg DESKTOP_SESSION=gnome PATH=/usr/local/perl/5.14.2/bin:/home/tom/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games PWD=/home/tom GDM_KEYBOARD_LAYOUT=us LANG=en_US.utf8 GNOME_KEYRING_PID=1123 MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path GDM_LANG=en_US.utf8 GDMSESSION=gnome SPEECHD_PORT=7061 SHLVL=1 HOME=/home/tom GNOME_DESKTOP_SESSION_ID=this-is-deprecated LOGNAME=tom XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/ DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-qx4aRF7BaK,guid=fbfa43a2de275e419a247be64ee8276f LESSOPEN=| /usr/bin/lesspipe %s DISPLAY=:0.0 LESSCLOSE=/usr/bin/lesspipe %s %s XAUTHORITY=/var/run/gdm/auth-for-tom-H1oWVw/database COLORTERM=gnome-terminal _=/usr/bin/printenv Perl: $ perl -V Summary of my perl5 (revision 5 version 14 subversion 2) configuration: Platform: osname=linux, osvers=2.6.32-33-generic, archname=i686-linux uname='linux ubuntu-1004 2.6.32-33-generic #72-ubuntu smp fri jul 29 21:08:37 utc 2011 i686 gnulinux ' config_args='-Dprefix=/usr/local/perl/5.14.2' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.4.3', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /lib/../lib /usr/lib/../lib /lib /usr/lib /usr/lib/i486-linux-gnu /usr/lib64 libs=-lnsl -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.11.1.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.11.1' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF Built under linux Compiled at Oct 1 2011 20:33:26 @INC: /usr/local/perl/5.14.2/lib/site_perl/5.14.2/i686-linux /usr/local/perl/5.14.2/lib/site_perl/5.14.2 /usr/local/perl/5.14.2/lib/5.14.2/i686-linux /usr/local/perl/5.14.2/lib/5.14.2 . System: $ uname -a Linux ubuntu-1004 2.6.32-36-generic #79-Ubuntu SMP Tue Nov 8 22:29:26 UTC 2011 i686 GNU/Linux
Subject: perldoc-perlfunc.output
Download perldoc-perlfunc.output
application/octet-stream 577.5k

Message body not shown because it is not plain text.

I guess I snuck in some weird changes before I released everything. If groff gets confused, it falls back to PostScript. I think I've fixed that in 3.15_13, now on it's way to CPAN. You can also try the sources in github: https://github.com/briandfoy/Pod-Perldoc
On Wed Dec 14 05:14:48 2011, BDFOY wrote: Show quoted text
> I guess I snuck in some weird changes before I released everything. If > groff gets confused, it > falls back to PostScript. > > I think I've fixed that in 3.15_13, now on it's way to CPAN. You can > also try the sources in > github: https://github.com/briandfoy/Pod-Perldoc
The short answer is that I see no substantial change with 3.15_13: * Ubuntu 10.04 Lucid with Perl 5.14.2 still generates Postscript, with some uninitialized value warnings. Details appended. * Ubuntu 11.10 Oneiric with Perl 5.14.2 still works, with warning Use of uninitialized value in concatenation (.) or string at /usr/local/perl/5.14.2/lib/5.14.2/Pod/Perldoc/ToMan.pm line 50. * OpenBSD 5.0 with 5.14.2 still fails. Details appended. * Mac OS 10.5.8 with Perl 5.15.4 and upgraded groff still works, with the same warning seen in Ubuntu 11.10. I have not had the gumption to back out my groff upgrade to see what happens, but I am willing to do this once we see Ubuntu 10.04 behave better. The Ubuntu and OpenBSD systems are running under Oracle VirtualBox. If things get truly desperate I could send you the virtual machines some way (how?). OpenBSD is 1.5 Gig, but Ubuntu 10.04 Lucid is 7.6 Gig. -------------- Ubuntu 10.04 Lucid Lynx ------------------ Perl version: tom@ubuntu-1004:~$ perl -v This is perl 5, version 14, subversion 2 (v5.14.2) built for i686-linux Perldoc version: tom@ubuntu-1004:~$ perl -MPod::Perldoc -E 'say Pod::Perldoc->VERSION' 3.15_13 Command: tom@ubuntu-1004:~$ perldoc perlfunc Use of uninitialized value in concatenation (.) or string at /usr/local/perl/5.14.2/lib/5.14.2/Pod/Perldoc/ToMan.pm line 50. Output (first 20 lines or so): %!PS-Adobe-3.0 %%Creator: groff version 1.20.1 %%CreationDate: Wed Dec 14 10:34:37 2011 %%DocumentNeededResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Courier %%+ font Courier-Oblique %%+ font Courier-Bold %%DocumentSuppliedResources: procset grops 1.20 1 %%Pages: 105 %%PageOrder: Ascend %%DocumentMedia: Default 612 792 0 () () %%Orientation: Portrait %%EndComments %%BeginDefaults %%PageMedia: Default %%EndDefaults %%BeginProlog %%BeginResource: procset grops 1.20 1 %!PS-Adobe-3.0 Resource-ProcSet /setpacking where{ pop ---------------------- OpenBSD 5.0 --------------------- System: $ uname -a OpenBSD openbsd50.my.domain 5.0 GENERIC#43 i386 Perl: $ perl -v This is perl 5, version 14, subversion 2 (v5.14.2) built for OpenBSD.i386-openbsd Pod::Perldoc: $ perl -MPod::Perldoc -E 'say Pod::Perldoc->VERSION' 3.15_13 perldoc perlvar output: $ perldoc perlvar Use of uninitialized value in concatenation (.) or string at /usr/local/perl/5.14.2/lib/5.14.2/Pod/Perldoc/ToMan.pm line 50. Use of uninitialized value $roffer in concatenation (.) or string at /usr/local/perl/5.14.2/lib/5.14.2/Pod/Perldoc/ToMan.pm line 53. Use of uninitialized value in concatenation (.) or string at /usr/local/perl/5.14.2/lib/5.14.2/Pod/Perldoc/ToMan.pm line 221. Error while formatting with Pod::Perldoc::ToMan: no nroffer set!? at /usr/local/perl/5.14.2/lib/5.14.2/Pod/Perldoc.pm line 1328 at /usr/local/perl/5.14.2/bin/perldoc line 9 Got a 0-length file from /usr/local/perl/5.14.2/lib/5.14.2/pod/perlvar.pod via Pod::Perldoc::ToMan!? at /usr/local/perl/5.14.2/bin/perldoc line 9
Can you set PERLDOCDEBUG=1 and try those again? Thanks,
If you want to send me those VMs, can you share a Dropbox folder with me, or create a public folder and send me the links?
Output from both Ubuntu 10.04 and OpenBSD 5.0 attached. The command in both cases was $ env PERLDOCDEBUG=1 perldoc perlfunc Maybe I should pick a shorter document to test with? As for drop boxes - I have none set up, and I don't think Comcast will allow 7 gig. Can you suggest something?
On Wed Dec 14 12:49:01 2011, WYANT wrote: Show quoted text
> Output from both Ubuntu 10.04 and OpenBSD 5.0 attached.
Only I forgot to attach the attachments. Duh!
Subject: ubuntu-10.04.log
Download ubuntu-10.04.log
application/octet-stream 1.1m

Message body not shown because it is not plain text.

Subject: openbsd-5.0.log
Download openbsd-5.0.log
application/octet-stream 2.9k

Message body not shown because it is not plain text.

I didn't get any attachments. The perlnumber manage is pretty short, by the way.
On Wed Dec 14 12:51:05 2011, BDFOY wrote: Show quoted text
> I didn't get any attachments. The perlnumber manage is pretty short, > by the way.
Ah, never mind, RT just showed them.
Thanks for doing all of this work. I've changed the sources around a bit. So far, I was only specifying a device for groff if it could handle UTF-8. I've adjusted it to specify a device in the alternate case. I don't know if I've chosen the right default device, but it's easy to change if I haven't. :) Instead of releasing a new version, you can try it directly from the repo: % git clone git://github.com/briandfoy/Pod-Perldoc.git % cd Pod-Perldoc % perl Makefile.PL % make % perl -Mblib perldoc perlnumber
On Wed Dec 14 14:14:25 2011, BDFOY wrote: Show quoted text
> Thanks for doing all of this work.
Not a problem. I look on it as enlightened self-interest. Show quoted text
> I've changed the sources around a > bit. So far, I was only > specifying a device for groff if it could handle UTF-8. I've adjusted > it to specify a device in the > alternate case. I don't know if I've chosen the right default device, > but it's easy to change if I > haven't. :) > > Instead of releasing a new version, you can try it directly from the > repo: > > % git clone git://github.com/briandfoy/Pod-Perldoc.git > % cd Pod-Perldoc > % perl Makefile.PL > % make > % perl -Mblib perldoc perlnumber
The bottom line is that it still fails under OpenBSD 5.0, but it works under all other circumstances I have tried, including some I added to the mix. Details follow, as well as a packaging nit-pick as a postscript (but not Postscript). Working from commit d8055e10212a285331aac1aef00e9675d0d8d88a Author: brian d foy <brian.d.foy@gmail.com> Date: Wed Dec 14 12:48:40 2011 -0600 Try harder to specify a device for groff We have to specify some device or it uses PostScript. I guess the default should be -Tlatin1. * Ubuntu 10.04 Lucid, Perl 5.14.2: Both 'perldoc perlfunc' and 'perl -f open' work with the github version, though they did not with 5.15_13. They do give the following warning: Use of uninitialized value in concatenation (.) or string at /usr/local/perl/5.14.2/lib/5.14.2/Pod/Perldoc/ToMan.pm line 50. * Ubuntu 11.10 Oneiric, Perl 5.14.2: Same as 10.04. This one always worked, but I thought I would check for regressions. * Fedora 16 Verne This always worked, and still does with the github version. * OpenBSD 5.0, Perl 5.14.2: Still fails. I have attached (really, this time) two logs of env PERLDOCDEBUG=1 perldoc perlfunc The .log0 file is with Mod::Perldoc 3.15 from CPAN, which produces raw POD, but scrolls it. The .log2 file is with Mod::Perldoc from github. * Mac OS 10.5.8, Perl 5.15.5: I dropped back to the 'groff' that came with the system (1.19.2), and confirmed that Pod::Perldoc 3.15_13 still gave me Postscript. Then I installed the github version, and that worked. It still gives the usual 'uninitialized' warning, but that's presumably cosmetic. It also still warns about having an old groff, which I believe is a feature. * Mac OS 10.5.8, Perl 5.6.2: Won't build, because it needs Pod::Man 2.18. The current Pod::Man wants Encode, and the current Encode wants at least Perl 5.7.3. I have not looked into this any further. * Mac OS 10.5.8, Perl 5.8.8: Works fine, except for the warning previously noted. PS - the threatened packaging nit-pick. Makefile.PL emits the message Warning: the following files are missing in your kit: MYMETA.yml
Subject: openbsd-5.0.log0
Download openbsd-5.0.log0
application/octet-stream 309.9k

Message body not shown because it is not plain text.

Subject: openbsd-5.0.log2
Download openbsd-5.0.log2
application/octet-stream 3k

Message body not shown because it is not plain text.

OpenBSD uses a formatter called "mandoc" instead of GNU groff, or the BSD inherited troff. In the perl distribution bundled with OpenBSD 5.0 (perl 5.12.2) Pod::Perldoc has been modified to use mandoc on that specific platform (presumably by whomever maintains perl for that platform.) We could potentially add "mandoc" to the list of candidate formatters. In the meantime, if you env "PERLDOC=-n mandoc" perldoc perlnumber the CPAN 3.15_13 release works fine on OpenBSD.
Show quoted text
> Use of uninitialized value in concatenation (.) or string at > /usr/local/perl/5.14.2/lib/5.14.2/Pod/Perldoc/ToMan.pm line 50.
Note to Brian: This is because $self->__nroffer is undef. If you add an else clause to the unless() at line 50, the warning goes away.
Subject: Re: [rt.cpan.org #73236] Raw postscript output under Mac OS 10.5.8 Leopard and Ubuntu 10.4 Lucid. No output under OpenBSD 5.0
Date: Wed, 14 Dec 2011 17:12:01 -0600
To: bug-Pod-Perldoc [...] rt.cpan.org
From: brian d foy <bdfoy [...] cpan.org>
On Wed, Dec 14, 2011 at 5:03 PM, Mark Allen via RT <bug-Pod-Perldoc@rt.cpan.org> wrote: Show quoted text
>       Queue: Pod-Perldoc >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=73236 > > > OpenBSD uses a formatter called "mandoc" instead of GNU groff, or the BSD inherited troff.  In > the perl distribution bundled with OpenBSD 5.0 (perl 5.12.2) Pod::Perldoc has been modified to > use mandoc on that specific platform (presumably by whomever maintains perl for that > platform.)
Can you send me the ToMan.pm for OpenBSD? I'll see about incorporating their changes somehow.
Show quoted text
> Can you send me the ToMan.pm for OpenBSD? I'll see about incorporating > their changes somehow.
This is all we should have to do: diff --git a/lib/Pod/Perldoc/ToMan.pm b/lib/Pod/Perldoc/ToMan.pm index 3c4531b..9f830a0 100644 --- a/lib/Pod/Perldoc/ToMan.pm +++ b/lib/Pod/Perldoc/ToMan.pm @@ -59,7 +59,7 @@ sub init { $self->_check_nroffer; } -sub roffer_candidates { ( 'groff', 'nroff' ) } +sub roffer_candidates { ( 'groff', 'nroff', 'mandoc' ) } sub find_roffer { my( $self, @candidates ) = @_;
On Wed Dec 14 18:25:31 2011, mallen wrote: Show quoted text
> > Can you send me the ToMan.pm for OpenBSD? I'll see about incorporating > > their changes somehow.
> > This is all we should have to do: > > diff --git a/lib/Pod/Perldoc/ToMan.pm b/lib/Pod/Perldoc/ToMan.pm > index 3c4531b..9f830a0 100644 > --- a/lib/Pod/Perldoc/ToMan.pm > +++ b/lib/Pod/Perldoc/ToMan.pm > @@ -59,7 +59,7 @@ sub init { > $self->_check_nroffer; > } > > -sub roffer_candidates { ( 'groff', 'nroff' ) } > +sub roffer_candidates { ( 'groff', 'nroff', 'mandoc' ) } > > sub find_roffer { > my( $self, @candidates ) = @_; >
Interesting. I was _not_ using the Perl that comes with OpenBSD, because I have been bitten enough by modifying the system Perl. So I was using a custom-built one. The custom-built Perl (5.14.2). With this custom-built Perl and Pod::Perldoc 3.15: $ perldoc perlfunc # produces raw POD $ perldoc -n mandoc perlfunc # produces formatted POD However, with the same Perl and the github Pod::Perldoc, to wit commit d8055e10212a285331aac1aef00e9675d0d8d88a Author: brian d foy <brian.d.foy@gmail.com> Date: Wed Dec 14 12:48:40 2011 -0600 Try harder to specify a device for groff We have to specify some device or it uses PostScript. I guess the default should be -Tlatin1. I still got an outright failure both with both of $ perldoc perlfunc $ perldoc -n mandoc perlfunc So there may be something else going on as well.
On Wed Dec 14 21:45:46 2011, WYANT wrote: Show quoted text
> I still got an outright failure both with both of > > $ perldoc perlfunc > $ perldoc -n mandoc perlfunc > > So there may be something else going on as well.
Yes, now that I think about it, we probably need to pass the -man flag to mandoc as well. I will test another patch tomorrow - my OpenBSD VM is on my work laptop (which is at $DAYJOB.) --Mark
On Wed Dec 14 18:12:29 2011, BDFOY wrote: Show quoted text
> Can you send me the ToMan.pm for OpenBSD? I'll see about incorporating > their changes somehow.
https://github.com/briandfoy/Pod-Perldoc/pull/3
I think I've fixed the issues with OpenBSD. I've tested it on 4.9 and 5.0. The support for UTF-8 sucks, but it doesn't suck more than it did with prior versions. At least you get output. I've also tested this with Ubuntu 11.10. The UTF-8 support there seems to be fine. I've released 3.15_14 to CPAN, and I want that one to be the version the goes into Perl 5.16.
On Sun Dec 18 11:12:25 2011, BDFOY wrote: Show quoted text
> I think I've fixed the issues with OpenBSD. I've tested it on 4.9 and > 5.0. The support for UTF-8 > sucks, but it doesn't suck more than it did with prior versions. At > least you get output. > > I've also tested this with Ubuntu 11.10. The UTF-8 support there seems > to be fine. > > I've released 3.15_14 to CPAN, and I want that one to be the version > the goes into Perl 5.16. >
Here's my take on Pod::Perldoc-3.15_14: * Mac OS 10.5.8, Perl 5.15.5: Works nicely. The "You have an old groff ... " warning from Pod/Perldoc.pm line 1328 is doubled. * Fedora 16, Perl 5.14.2: Works nicely. No warnings. * OpenBSD 5, Perl 5.14.2: Works very well. No warnings, and unlike version 3.15 produces formatted POD rather than raw POD. * Ubuntu 10.04 LTS Lucid: Works nicely. No Warnings. * Ubuntu 11.10 Oneiric: Works nicely. No warnings. An observation: When you issue 'perldoc -f open', Pod::Perldoc 3.15_14 displays the "User Contributed Perl Documentation" header, with the name of the temporary file left and right. Pod::Perldoc 3.15_04 (which comes with Perl 5.14.2) displays no header. This was observed under Ubuntu 10.04, and confirmed under Ubuntu 11.10 and Mac OS 10.5.8. I was too lazy to go back and check Fedora and OpenBSD, but I can if you want.