Net::Gnip::PublisherStream - represent a list of Gnip Publisher


Net-Gnip documentation Contained in the Net-Gnip distribution.

Index


Code Index:

NAME

Top

Net::Gnip::PublisherStream - represent a list of Gnip Publisher

SYNOPIS

Top



    # 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;
    }

METHODS

Top

new

Create a new, empty stream

publishers [publisher[s]]

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;