Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Re: Re: It is not an array!by premchai21 (Curate) |
on Nov 19, 2002 at 01:51 UTC ( [id://214009]=note: print w/replies, xml ) | Need Help?? |
I see what is going on now. This line:
makes a reference to the array @_, and assigns $class that reference. %parameters is left blank. Calling ref on an unblessed array reference returns ARRAY; the next line then blesses $self as ARRAY. Removing the backslash in the first line would cause $class to get the first argument, and %parameters to get the other arguments converted into a hash, which seems to be more what you want.
In Section
Seekers of Perl Wisdom
|
|