Use that class for creating streams which you can use to push item to them.
Version 0.11
Creating pushable streams, you can use this type of streams for example for observer pattern
use Async::Stream::Pushable; my $stream = Async::Stream::Pushable->new; $stream->push(1,2,3)->finalize; # Or for example my $stream = Async::Stream::Pushable->new; $some_object->subscribe(sub { my $new_item = shift; $stream->push($new_item); });
Constructor creates instance of class. Class method create stream which you can use that to push items to that.
my $stream = Async::Stream::Pushable->new(@urls)
Push new items to stream
my $stream->push(@new_items);
Finalize stream
my $stream->finalize;
Kirill Sysoev, <k.sysoev at me.com>
<k.sysoev at me.com>
Please report any bugs or feature requests to https://github.com/pestkam/p5-Async-Stream/issues.
You can find documentation for this module with the perldoc command.
perldoc Async::Stream::Item
Copyright 2017 Kirill Sysoev.
This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:
http://www.perlfoundation.org/artistic_license_2_0
To install Async::Stream, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Async::Stream
CPAN shell
perl -MCPAN -e shell install Async::Stream
For more information on module installation, please visit the detailed CPAN module installation guide.