Bug 1614708 - perldoc warns about binary data depending on TERM variable
Summary: perldoc warns about binary data depending on TERM variable
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-Pod-Perldoc
Version: 28
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL: https://rt.perl.org/Public/Bug/Displa...
Depends On:
TreeView+ depends on / blocked
Reported: 2018-08-10 09:26 UTC by A. Galama
Modified: 2019-05-03 11:09 UTC (History)
2 users (show)

Fixed In Version: perl-Pod-Perldoc-3.28.01-1.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-05-03 11:09:11 UTC
Type: Bug

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1329059 0 unspecified CLOSED Don't produce terminal control sequences in perldoc 2021-02-22 00:41:40 UTC

Internal Links: 1329059

Description A. Galama 2018-08-10 09:26:14 UTC
Description of problem:

Depending on the value of the TERM environment variable perldoc sometimes warns about binary content.

Version-Release number of selected component (if applicable):

Perldoc v3.28, under perl v5.026002 for linux

How reproducible:

Steps to Reproduce:
1. TERM=xterm perldoc Time::HiRes
2. TERM=linux perldoc Time::HiRes

Actual results:
1. Everything fine
2. "/tmp/6UsPxoKooT" may be a binary file.  See it anyway?

The warning doesn't come up if I use "man" instead of "perldoc".

Comment 1 Petr Pisar 2018-08-10 11:26:23 UTC
This looks like an issue in Pod::Perldoc::ToTerm that adds ANSI sequences into the formatted output according to a current terminal:

E.g. the NAME section title changes:


This is saved into a file and a pager, "/usr/bin/less -isr" probably, is called on that file. In the TERM=linux case /usr/bin/less comes to a conclusion that the file is a binary garbage and asks for permission to spoil a terminal.

And indeed the TERM=linux output is not propebly displayed on Linux virtual terminal, an `O' letter hangs after the title. Whether it's a Pod::Perldoc::ToTerm or a terminal database bug I don't know.

There were numerous bug reports to Pod-Perldoc CPAN distribution, e.g.:


and that lead to Perl bug:


that was resolved by patching Pod::Perldoc to use plain text output without ANSI formatting (i.e. Pod::Perldoc::ToText instead of Pod::Perldoc::ToTerm).

I'm keen to apply the Perl patch to Fedora <= 28. It will disappear the bold highlighting but it makes the text legible on all terminals.

Comment 2 Fedora Update System 2018-08-10 11:54:31 UTC
perl-Pod-Perldoc-3.28.01-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-9d12bea0f8

Comment 3 Fedora Update System 2018-08-11 19:38:28 UTC
perl-Pod-Perldoc-3.28.01-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-9d12bea0f8

Comment 4 Fedora Update System 2018-08-22 11:36:56 UTC
perl-Pod-Perldoc-3.28.01-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 5 Ben Cotton 2019-05-02 21:02:49 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Note You need to log in before you can comment on or make changes to this bug.