method opened

Documentation for method opened assembled from the following types:

class IO::CatHandle

From IO::CatHandle

(IO::CatHandle) method opened

Defined as:

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

Returns True if the invocant has any source handles, False otherwise.

say      .opened# OUTPUT: «False␤» 
say$*IN).opened# OUTPUT: «True␤» 
(my $f1 = 'foo'.IO).spurt: "A\nB\nC";
with $f1 {
    .opened.say# OUTPUT: «True␤» 
    .opened.say# OUTPUT: «False␤» 

class IO::Handle

From IO::Handle

(IO::Handle) method opened

Defined as:

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

Returns True if the handle is open, False otherwise.