Documentation for routine t

Documentation for routine t, assembled from the following types:

class IO::Handle

From IO::Handle

(IO::Handle) method t

Defined as:

method t(IO::Handle:D: --> Bool:D)

Returns True if the handle is opened to a TTY, False otherwise.

class IO::CatHandle

From IO::CatHandle

(IO::CatHandle) method t

Defined as:

method t(IO::CatHandle:D: --> Bool:D)

Calls .t (tells if the handle is a TTY) on the currently active source handle and returns the result. If the source handle queue has been exhausted, returns False.

(my $f1 = 'foo'.IO).spurt: 'foo';
with $f1$*IN {
    repeat { .t.say } while .next-handle# OUTPUT: «False␤True␤»