freebsd-ports/lang/perl5.28/files/patch-cpan_Pod-Perldoc_lib_Pod_Perldoc.pm
Mathieu Arnold 39a3574d50 Put back a default non dumb pod formatter [1], and fix a probable bug in
the mandoc formatter.

PR:		236092 [1]
Reported by:	Andrew Daugherity
2019-03-14 21:13:01 +00:00

16 lines
514 B
Perl

Put back some non dumb outputter by default
--- cpan/Pod-Perldoc/lib/Pod/Perldoc.pm.orig 2019-03-12 16:47:18 UTC
+++ cpan/Pod-Perldoc/lib/Pod/Perldoc.pm
@@ -486,6 +486,11 @@ sub init_formatter_class_list {
$self->opt_M_with('Pod::Perldoc::ToPod'); # the always-there fallthru
$self->opt_o_with('text');
+ $self->opt_o_with('man')
+ unless $self->is_mswin32 || $self->is_dos || $self->is_amigaos
+ || !($ENV{TERM} && (
+ ($ENV{TERM} || '') !~ /dumb|emacs|none|unknown/i
+ ));
return;
}