File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -483,6 +483,21 @@ handy in various instances.
483
483
484
484
= head1 Input and Output
485
485
486
+ = head2 Closing Open File Handles and Pipes
487
+
488
+ Unlike some other languages, Perl 6 does not use reference counting,
489
+ and so B < the file handles are NOT closed when they go out of scope > . You
490
+ have to explicitly close them either by using L < close > routine or using the
491
+ C < :close > argument several of L < IO::Handle's|/type/IO::Handle > methods accept.
492
+ See L « C < IO::Handle.close > |/type/IO::Handle#routine_close» for details.
493
+
494
+ The same rules apply to L < IO::Handle's|/type/IO::Handle > subclass
495
+ L < IO::Pipe > , which is what you operate on when reading from a L < Proc > you get
496
+ with routines L < run > and L < shell > .
497
+
498
+ The caveat applies to L < IO::CatHandle > type as well, though not as severely.
499
+ See L « C < IO::CatHandle.close > |/type/IO::CatHandle#method_close» for details.
500
+
486
501
= head2 IO::Path Stringification
487
502
488
503
Partly for historical reasons and partly by design, an L < IO::Path > object
You can’t perform that action at this time.
0 commit comments