On Thu, 02 Dec 2004 16:20:17 +1100, Michael Kraus <[EMAIL PROTECTED]> wrote:

I've noticed a lot of modules can be initialised in the form:
my $instance = Module->new( option => "value1", option2 => "value2" )
How is this implemented?  Is the above simply passing a hash reference?

Any function, including new() can take parameters as an array or a hash, then it can do whatever it wants with the hash, values, just like it would with array values


Please also refer to Damian Conway's "Object Oriented Perl", a very good introduction to what you are trying to achieve.

--
Regards,
Edward WIJAYA
SINGAPORE

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to