# New Ticket Created by Vasily Chekalkin
# Please include the string: [perl #61216]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61216 >
Hello.
There is (temporary) patch for support list assignment for IOIterator.
E.g. $i = =$fh; @a=$fh.
--
Bacek
commit 9e88b83f206a5b36af6e6c0d718ad9e1df3c4c3c
Author: Vasily Chekalkin <[EMAIL PROTECTED]>
Date: Tue Dec 9 21:55:17 2008 +1100
Implement 'infix:=(List,IOIterator)'
diff --git a/languages/perl6/src/classes/IO.pir b/languages/perl6/src/classes/IO.pir
index be67b70..3d5484d 100644
--- a/languages/perl6/src/classes/IO.pir
+++ b/languages/perl6/src/classes/IO.pir
@@ -235,6 +235,24 @@ Return the value inside this container in item context.
.return(self)
.end
+.namespace []
+
+=item infix:=
+
+Assign IOIterator to List
+
+FIXME: This method should be removed after implementing LazyLists
+
+=cut
+
+.sub 'infix:=' :multi(['List'], ['IOIterator'])
+ .param pmc list
+ .param pmc it
+ $P0 = getattribute it, '$!IO'
+ $P1 = $P0.'lines'()
+ .tailcall 'infix:='(list, $P1)
+.end
+
=back