t
ErrorsCollection

t

Synthesised documentation from type/IO/Handle type/IO/CatHandle

From type/IO/Handle

See Original text in context

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

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

From type/IO/CatHandle

See Original text in context

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

Calls .t, which tells if the handle is a TTY, on the currently active source handle and returns the result. If the source handle queue may get exhausted, returns False.

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