Net::Gnip::BaseStream - represent a list of Gnip objects
# Create a new stream my $stream = Net::Gnip::BaseStream->new(); # ... or parse from XML my $stream = Net::Gnip::BaseStream->parse($xml); # assume that the subclass of BaseStream # has children named foo # set the foos $stream->foos(@foos); # get the filters my @foos = $stream->foos; # or use an iterator while (my $foo = $stream->next) { print $foo->name; } $stream->reset; # ... now you can use it again while (my $foo = $stream->foo) { print $foo->name; }
Create a new, empty stream
Get or set the children
Takes a string of XML, parses it and returns a new, potentially populated FilterStream
Returns the next Child object
Resets the iterator
Return this stream as xml
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.