On Thu, Jun 12, 2008 at 03:13:47AM +0200, Sbastien Aperghis-Tramoni wrote: > Given that ExtUtils::Constant::ProxySubs currently has no > documentation, we should now write one. I can do it if I know enough > to explain it. Is a proxy sub the name of the constant being stored > directly in the stash or it is another mechanism? Yes. That was the term I was using to describe a reference to a constant stored in the stash being used as a proxy for the "real thing" - a typeglob with a subroutine that has an explicit empty prototype and returns a constant. The sort that the tokeniser can interpolate values at compile time, so can be constant folded and subject to other optimisations. So ExtUtils::Constant::ProxySubs is generating code to generate those at XS module BOOT time, rather than generating code to create new subroutines via AUTOLOAD. (Which can't be interpolated by the tokeniser, and actually also take more memory) Nicholas ClarkThread Previous | Thread Next