This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix overload index mismatch in overloading logic.
authorVincent Pit <perl@profvince.com>
Fri, 2 Jan 2009 11:01:50 +0000 (12:01 +0100)
committerVincent Pit <perl@profvince.com>
Fri, 2 Jan 2009 11:05:26 +0000 (12:05 +0100)
commitd87d3eede5d67a7d281a1d929949e466e06bc21a
treed3b7957bee458c23ec30cf81ad96981e9040399d
parent83706693c63eb4fe0fd171a88263c83548c89029
Fix overload index mismatch in overloading logic.

In amagic_call(), the 'method' arg comes the overload enum in overload.h, but is expected to match the bit set from %overloading::numbers::names. It values wrongly start at 1, differing by 1 from the enum indexes. This didn't appear in the tests because 'method' was reduced modulo 7 instead of 8.
gv.c
lib/overload/numbers.pm
overload.pl