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

RE: [PATCH h2xs] Use of static data in XS modules

Thread Previous | Thread Next
From:
Paul Marquess
Date:
October 30, 2001 08:10
Subject:
RE: [PATCH h2xs] Use of static data in XS modules
Message ID:
AIEAJICLCBDNAAOLLOKLEEKJDDAA.Paul_Marquess@Yahoo.co.uk
From: Tim Bunce [mailto:Tim.Bunce@pobox.com]

> On Mon, Oct 29, 2001 at 12:04:10PM -0000, Paul Marquess wrote:
> > From: Gurusamy Sarathy [mailto:gsar@ActiveState.com]
> >
> > > On Sun, 28 Oct 2001 22:02:52 GMT, Tim Bunce wrote:
> > > >I think it needs some more words of explanation (or pointers) in
> > > >the docs and/or generated code as to why it's needed and how
> the fields
> > > >in the struct are accessed.
> > >
> > > Yes, ideally, there would be documentation and examples in perlxs.pod.
> > > Paul said he might look into that.  Right now, perl.h has the
> following
> > > by way of comments, which should be enough for someone to write the
> > > perlxs.pod additions:
> >
> > Yep, I was intending to add a few words to perlxs.pod at the
> weekend, but
> > life got in the way. I have a few sentences cobbled together,
> but I need to
> > find some the time to add a few more.
> >
> > The next change I need to make for h2xs is to add a chunk of
> > "backward-compatibility" code to allow older Perl's to make use of this
> > facility. I'm tempted just to get h2xs to spit out an extra file called,
> > say, "compat.h".
>
> I think I'd prefer it if this was all added to Devel::PPPort since that'll
> more readily help more people (including the DBI :)
>
> And h2xs could usefully have an option to include Devel::PPPort.

Now there's a program I had completely forgotten about. Is it still being
actively maintained? The last version on CPAN, 1.0007, is dated 5th March
1999. Kenneth, can you comment?

I agree that the CXT code is a prime candidate for inclusion in
Devel::PPPort, but...

From the h2xs perspective, we have just given it the ability to generate CXT
template code for XS modules. Without a backward-compatibility mode the
template code will only work with Perl 5.7.2+patches. This seriously limits
it usefulness.

Reworking h2xs to get it to make use of Devel::PPPort, if it is present,
would be an improvement, but that still means that modules will only get the
backward-compatibility code if the author has remembered/known to install
Devel::PPPort on their system.

I guess the thing that concerns me is that we are making life more difficult
for module authors than it needs to be by making backward-compatibility mode
dependant on the presence of an optional module.

Have we reached the stage where we need to seriously consider including
Devel::PPPort in the core (with a parallel existence on CPAN)?

Paul


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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