TITLE ^

Stream::Replay - replayable Stream

VERSION ^

version 0.1

SYNOPSIS ^

    load_bytecode "library/Stream/Replay.pir"

    $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

DESCRIPTION ^

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

METHODS ^

init
...
assign stream, source
...
stream."rawRead"() (internal)
...
stream2 = clone stream
...

AUTHOR ^

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 ^

Copyright (C) 2004-2008, The Perl Foundation.


parrot