Net::Gnip::PublisherStream - represent a list of Gnip Publisher
# Create a new stream my $stream = Net::Gnip::PublisherStream->new(); # ... or parse from XML my $stream = Net::Gnip::FilterStream->parse($xml); # set the publishers $stream->publishers(@publisher); # get the publishers my @publishers = $stream->publishers; # or use an iterator while (my $publisher = $stream->next) { print $publisher->name; } $stream->reset; # ... now you can use it again while (my $publisher = $stream->next) { print $publisher->name; }
Create a new, empty stream
Get or set the publishers
To install Net::Gnip, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Gnip
CPAN shell
perl -MCPAN -e shell install Net::Gnip
For more information on module installation, please visit the detailed CPAN module installation guide.