develooper Front page | perl.perl5.porters | Postings from October 2011

XS AUTOLOAD

Thread Next
From:
Steffen Mueller
Date:
October 11, 2011 09:04
Subject:
XS AUTOLOAD
Message ID:
4E9468E8.8050206@cpan.org
This is regarding Father Chrysostomos' changes to fix the current 
behaviour of XS AUTOLOAD methods, specifically commits 
8fa6a40953ef88573ed3cbbb37666e7b72dec7dd and the tests in 
6911735f50121ad015d280f86e257e8e9eae797a.

My network connection is too slow/bad/mobile to searching for the bug, 
but I know there's a perlbug that I filed about AUTOLOAD methods 
implemented in XS. In a nutshell, because Doug's hack prevents $AUTOLOAD 
from being set at all, the XS AUTOLOAD cannot be inherited/reused. The 
SvPVX of the CV only contains the method name, not the class, so it's 
not sufficient for figuring out for which class the AUTOLOAD was invoked.

I hope my memory didn't fail me, but it'll be some time before I can 
check for sure.

This bug in conjunction with the general badness of the SvPVX(CV) abuse 
makes me think that unless a CPAN grep turns up many examples, it may be 
worth breaking the long-standing behaviour. If we don't, does anybody 
have an idea how to efficiently include the namespace part of $AUTOLOAD?

Best regards,
Steffen

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About