develooper Front page | perl.perl5.porters | Postings from June 2008

Re: Change 34005: Re: CPAN Upload: S/SA/SAPER/Sys-Syslog-0.25.tar.gz

Thread Previous | Thread Next
Nicholas Clark
June 12, 2008 01:45
Re: Change 34005: Re: CPAN Upload: S/SA/SAPER/Sys-Syslog-0.25.tar.gz
Message ID:
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 Clark

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About