5 This example shows the usage of C<Stream::Sub>.
13 Creates a C<Stream::Sub> and dumps it.
20 load_bytecode 'Stream/Sub.pbc'
22 stream = new ['Stream'; 'Sub']
24 # set the stream's source sub
25 .const 'Sub' temp = "_hello"
36 This sub is used as the source for the stream.
38 It just writes some text to the stream.
43 self."write"( "hello" )
44 self."write"( "world!" )
45 self."write"( "parrot" )
46 self."write"( "is cool" )
53 Jens Rieks E<lt>parrot at jensbeimsurfen dot deE<gt> is the author
55 Please send patches and suggestions to the Perl 6 Internals mailing list.
59 Copyright (C) 2004-2009, Parrot Foundation.
67 # vim: expandtab shiftwidth=4 ft=pir: