
Stream;Replay - replayable Stream

version 0.1

load_bytecode 'Stream/Replay.pbc'
$P0 = new ['Stream'; 'Replay']
assign $P0, other_stream
# .. read from $P0 ..
$P1 = clone $P0
# .. read further ..
$P0 = $P1
# now, if you read from $P0, you get the same data as after the clone

By using clone, you can read data from a stream as often as you want.

...
...
...
...

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-2009, Parrot Foundation.