NAME
Use that class for creating streams which you can use to push item to them.
VERSION
Version 0.11
SYNOPSIS
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);
});
SUBROUTINES/METHODS
new(@array_of_items)
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)
Push new items to stream
my $stream->push(@new_items);
finalize()
Finalize stream
my $stream->finalize;
AUTHOR
Kirill Sysoev, <k.sysoev at me.com>
BUGS AND LIMITATIONS
Please report any bugs or feature requests to https://github.com/pestkam/p5-Async-Stream/issues.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Async::Stream::Item
LICENSE AND COPYRIGHT
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: