Subject: | hash methods don't accept a hash reference |
package: libclass-methodmaker-perl 2.02-1 (Debian)
perl -v: This is perl, v5.8.4 built for i386-linux-thread-multi
uname -a: Linux thoth 2.4.27-1-386 #1 Fri Sep 3 06:24:46 UTC 2004
i686 GNU/Linux
Attempting to set a hash value using a hash reference instead of a list gives the error:
Uneven number of arguments to method 'foo'.
According to the documentation, this should work. This behavior makes it impossible to initialize hash values of objects during instantiation, as exhibited by the following:
perl -e 'use Class::MethodMaker [ new => [qw(-hash new)], hash => ["foo"] ]; new main (foo => {})'
Note that I've only tested this against v2.02-1, but I've manually checked the code in 2.04 and it doesn't seem to have been fixed.