I ++ this method. But I wanted to note that there is an extra advantage to this method over using \@stuff as advocated by several other people. Doing, for example:
will cause $self->{clientcrgunit} to be modified to hold the list returned by getNextBatchOfStuff(). So, if you don't go with arturo's solution, you should probably use: $self->{clientcrgunit}= [@stuff]; instead. You can avoid this extra copying if you know that @stuff is a lexical variable that won't be modified again until it is destroyed. - tye (but my friends call me "Tye")$self->{clientcrgunit}= \@stuff; @stuff= getNextBatchOfStuff();
In reply to (tye)Re: Putting contents of an array into Object property
by tye
in thread Putting contents of an array into Object property
by fmogavero
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |