parrotcode: a PIR sub as target for a Stream | |
Contents | Libraries |
Stream::Writer - a PIR sub as target for a Stream
version 0.1
# create the stream
find_type $I0, "Stream::Writer"
new stream, $I0
# set the source sub
newsub temp, .Sub, _reader
stream."source"( temp )
stream."write"( "hello, world" )
...
.sub _reader method
.local string str
str = self."read"()
.end
Jens Rieks <parrot at jensbeimsurfen dot de> is the author and maintainer. Please send patches and suggestions to the Perl 6 Internals mailing list.
Copyright (c) 2004, the Perl Foundation.
|