develooper Front page | perl.perl5.porters | Postings from May 2010

RE: PERL_NO_GET_CONTEXT (Was: [PATCH] shift; optimization)

Thread Previous | Thread Next
From:
Jan Dubois
Date:
May 4, 2010 17:55
Subject:
RE: PERL_NO_GET_CONTEXT (Was: [PATCH] shift; optimization)
Message ID:
00c801caebed$a1ddbac0$e5993040$@activestate.com
On Mon, 03 May 2010, Steffen Mueller wrote:
> I agree that the Perl docs are big and not always well laid out, but is
> perl*guts* the place to document something that an XS author should
> certainly remember? OTOH, it's discussed to great lengths in perlguts,
> so if we assume that an XS author has at least skimmed the document as
> he should, he won't completely oblivious to it.

I can't think of any excuse why an XS author should not have read perlguts.pod
multiple times. :)

> Also, is this a default that we might be able to change down the road?

It is possible, but it will break XS extensions that have not
prepared for this.

We went through a similar phase when all exported Perl symbols got a
prefix like "PL_", "perl_" or "Perl_" to avoid namespace pollution with
other libraries. This too wasn't source level compatible for XS code, so
an escape hatch was needed for CPAN code that wasn't yet updated:

   perl Makefile.PL POLLUTE=1

would still make the old symbols available. I think something similar
would be necessary (for MakerMaker *and* Module::Build). I somewhat
doubt that it is really worth it though; just file "enhancement
requests", ideally with a patch, against any XS module that is important
to you and hope that eventually the idea will spread by cut&paste
programming. :)

Cheers,
-Jan


Thread Previous | 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