Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Object Access Issue

by Bloodnok (Vicar)
on Mar 19, 2014 at 11:21 UTC ( #1078930=note: print w/replies, xml ) Need Help??


in reply to Object Access Issue

That looks rather like a representation of the aggregate/composite pattern - a list being an object (which, as tobyink has already pointed out, has an unusual name - LocalLB::ObjectStatus[]) which itself contains a number of other objects (of class LocalLB::ObjectStatus).

In order to access the contained objects, I suggest that you have a look at the containing class (LocalLB::ObjectStatus[]) to determine the name(s) of the accessor methods - which will, I would guess, follow the form of the GoF Iterator pattern e.g. get_next(), has_next() etc.

HTH ,

A user level that continues to overstate my experience :-))

Replies are listed 'Best First'.
Re: Object Access Issue
by Darren123 (Initiate) on Mar 19, 2014 at 14:22 UTC

    Thank you all for your help.

    It took me a while to digest what you had all posted, but I have now worked it out, and it seems so simple now!

    In the end all I needed was this:

    foreach ($ic->get_ltm_pool_members_status($pool)) { foreach (@{$_}) { print "$_->{enabled_status}\n"; }

    Thanks

    Darren

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1078930]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2022-05-25 20:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (90 votes). Check out past polls.

    Notices?