Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: OOP: How to construct multiple instances of a class at once

by kennethk (Abbot)
on Nov 14, 2012 at 16:06 UTC ( #1003845=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub new {
        my $proto = shift(@_);
            my $class = ref($proto) || $proto;
    ...
    
            return @results;
    }
    
  2. or download this
    my @users = map {User->new($_)} @userIds;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003845]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2017-12-11 06:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (286 votes). Check out past polls.

    Notices?