GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  WEBSERVICE::GDATA::COLLECTION (3)

.ds Aq ’

NAME

WebService::GData::Collection - Composite class redispatching method calls to query the items data.

CONTENTS

SYNOPSIS



    use WebService::GData::Collection;

    #array ref of link nodes
    my $links = new WebService::GData::Collection($links);

    #search through the nodes for a certain value
    my $reponse_url = $links->rel(video.responses)->[0];
  
    #access the object as if it was an array reference
    $links->[0];
   
    #loop through it as if it was a normal array reference
    foreach my $link (@$links) {
        #$link->rel...
    }



DESCRIPTION

inherits from WebService::GData::BaseCollection

This package accepts an array reference containing identic nodes (link nodes, category nodes,video nodes...). Once feed with some data, you can call a node method by specifying a search string. The instance will simply redispatch the call to all its children and return any children that match(=~m/$search/) your query.

CONSTRUCTOR

new

Create a Collection instance.

<B>ParametersB>
collection:ArrayRef - (optional) an array reference of nodes or identic instances.

<B>ReturnsB>
WebService::GData::Collection instance

<B>ExampleB>



    use WebService::GData::Collection;
   
    my $collection = new WebService::GData::Collection();
   
    $collection->[0] = new WebService::GData::Node::AuthorEntity();
   
    or
    my $collection = new WebService::GData::Collection(\@authors);



    OVERLOAD

In order to fake array reference behavior, the array reference context is overloaded to return the actual array stored in the instance.

<B>ExampleB>



    use WebService::GData::Collection;

    my $authors = new WebService::GData::Collection(\@authors);    
   
    foreach my $author (@$authors) {
        $author->name;
    }
   
    push @$author,new WebService::GData::Node::AuthorEntity();



BUGS AND LIMITATIONS

If you do me the favor to _use_ this module and find a bug, please email me i will try to do my best to fix it (patches welcome)!

AUTHOR

shiriru <shirirulestheworld[arobas]gmail.com>

LICENSE AND COPYRIGHT

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 WEBSERVICE::GDATA::COLLECTION (3) 2011-01-16

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.