From 8e34da7f66a201237cdf68049fa250c8a258a437 Mon Sep 17 00:00:00 2001 From: pmichaud Date: Thu, 24 Sep 2009 11:31:34 -0500 Subject: [PATCH] Add the IO.t method for testing that a filehandle is opened to a tty. (hv2++) --- src/setting/IO.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/setting/IO.pm b/src/setting/IO.pm index 232bc4d5c52..602653bead8 100644 --- a/src/setting/IO.pm +++ b/src/setting/IO.pm @@ -52,6 +52,9 @@ class IO is also { $!PIO.readall(); } + multi method t() { + $!PIO.isatty; + } } multi sub lines(IO $filehandle,