We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7d2bf0f commit d39fdccCopy full SHA for d39fdcc
lib/PDL/Doc/Perldl.pm
@@ -49,7 +49,6 @@ our @EXPORT = qw( apropos aproposover usage help sig badinfo whatis );
49
use PDL::Doc;
50
use Pod::Select;
51
use Pod::PlainText;
52
-use Term::ReadKey; #for GetTerminalSize
53
use Cwd; # to help Debian packaging
54
55
$PDL::onlinedoc = PDL::Doc->new(FindStdFile());
@@ -73,8 +72,12 @@ sub FindStdFile {
73
72
# to work (at least on my solaris and linux
74
# machines)
75
#
76
-sub screen_width() {
77
- return ( ( GetTerminalSize(\*STDOUT) )[0] // 72);
+sub screen_width {
+ local $@;
+ eval {
78
+ require Term::ReadKey;
79
+ ( Term::ReadKey::GetTerminalSize(\*STDOUT) )[0];
80
+ } // 72;
81
}
82
83
sub printmatch {
0 commit comments