| Net-Gnip documentation | Contained in the Net-Gnip distribution. |
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
| Net-Gnip documentation | Contained in the Net-Gnip distribution. |
package Net::Gnip::PublisherStream; use strict; use base qw(Net::Gnip::BaseStream); use Net::Gnip::Publisher;
sub publishers { my $self = shift; return $self->children(@_); } sub _child_name { 'publisher' } sub _elem_name { 'publishers' } 1;