Subject: | Infinite Recursion When Sub Classed |
Date: | Wed, 9 Dec 2009 02:05:01 -0500 (EST) |
To: | bug-Hash-AsObject [...] rt.cpan.org |
From: | Skye Shaw <sshaw [...] lucas.cis.temple.edu> |
Hi,
When you define methods in AUTOLOAD like:
*{ "${cls}::$key" } = sub { }
And attempt to call them with:
goto &$key
AUTOLOAD will be called infinitely since the sub was
defined in $cls's namespace not Hash::AsObject's.
Easy fix:
goto &{ "${cls}::$key" }
I've attached a patch and added to test 07.
-Skye
Message body is not shown because sender requested not to inline it.