Data::Stream - capability based stream model
Common: (Next Reset Peek First Exhausted) Next: $stream->next Reset: $stream->reset Peek: (Next) $stream->peek # defaulted First: (Reset, Next) $stream->first # defaulted Exhausted: $stream->exhausted Exhausted::Peek: (Exhausted) $sream->exhausted # defaulted Ready: (Next) $stream->ready $stream->next_if_ready # defaulted MultiNext: (Next) $stream->next(Int $how_many); # defaulted
Can we consider certain things universal? Should peek always be permitted even though it can potentially retain a reference to a large/contended resource?
What are sensible capabilities for e.g. a socket stream?
Seeking, skipping ...
Composition of potentially inefficient defaults?
MultiNext may interfere with simple wrappers for next - can we deal with that somehow? (multi+around?)
To install Data::CapabilityBased, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::CapabilityBased
CPAN shell
perl -MCPAN -e shell install Data::CapabilityBased
For more information on module installation, please visit the detailed CPAN module installation guide.