Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > how to loop over instances of a class

Reply
Thread Tools

how to loop over instances of a class

 
 
fulko.hew@sita.aero
Guest
Posts: n/a
 
      01-30-2004
There has got to be a built in way to loop over all instances of a class.
But I can't find it.

ie.

foreach $y (MYCLASS: {
$y->mymethod();
}
 
Reply With Quote
 
 
 
 
Jay Tilton
Guest
Posts: n/a
 
      01-30-2004
wrote:

: There has got to be a built in way to loop over all instances of a class.

What have you read that makes you believe that?

 
Reply With Quote
 
 
 
 
Brian McCauley
Guest
Posts: n/a
 
      01-31-2004
"Jeff Thies" <> writes:

> > There has got to be a built in way to loop over all instances of a class.
> > But I can't find it.

>
> Personally, I push a reference to it on an array.


Yep, and don't forget to Scalar::Util::weaken() it.

--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Triple nested loop python (While loop insde of for loop inside ofwhile loop) Isaac Won Python 9 03-04-2013 10:08 AM
dicts,instances,containers, slotted instances, et cetera. ocschwar@gmail.com Python 8 01-29-2009 09:52 AM
VOIP over VPN over TCP over WAP over 3G Theo Markettos UK VOIP 2 02-14-2008 03:27 PM
list of class instances within a list of a class instances John Wohlbier Python 2 02-22-2004 08:41 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57