Please turn on warnings.  You are using

  my ($kernel, $self, $heap) = $_[KERNEL, OBJECT, HEAP];

when an array slice is needed

  my ($kernel, $self, $heap) = @_[KERNEL, OBJECT, HEAP];

Note the difference between

1) poerbook:~% perl -e 'my ($a, $b, $c) = $x[0,1,2];'
(no output)

and with warnings on:

1) poerbook:~% perl -we 'my ($a, $b, $c) = $x[0,1,2];'
Multidimensional syntax $x[0,1,2] not supported at -e line 1.
Name "main::x" used only once: possible typo at -e line 1.

--
Rocco Caputo - rcap...@pobox.com


On Jun 13, 2009, at 20:20, Rob Fugina wrote:

I've been away from the list for a while, but now I'm wondering if
everyone else hasn't, as well.  Is anybody still here?

I've been having some trouble writing a couple of modules with object
states recently -- usually I stick to inline states -- and I was
hoping someone here would be able to give me some advice.  Maybe
someone can start by explaining why in the attached program it seems
that the parameters aren't lined up properly with the constants
(OBJECT, SESSION, HEAP, etc...).  The result is a mess...

Thanks,
Rob
<objtest.pl>

Reply via email to