in reply to Iterating though an array of objects
You should really format your code better (one indetion level per opneing brace, see perlstyle), it is very hard to read as is. Maybe the problem becomes visible then?
One obvious problem is:
sub scores { my ( $self, @scores )= @_; ... } # and later $node->scores(['3','177','12',]);
The scores method expcets a flat list, but you pass an array reference to it.
Also dubious:
eval{person->new();} or die ($@);
Why catch errors with eval if all you do is rethrowing them?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Iterating though an array of objects
by chromatic (Archbishop) on Aug 27, 2012 at 16:23 UTC |