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

Re: [perl #22178] ExtUtils::Constant::WriteConstants doesn't handle enums

Thread Previous
From:
Nicholas Clark
Date:
May 12, 2003 14:27
Subject:
Re: [perl #22178] ExtUtils::Constant::WriteConstants doesn't handle enums
Message ID:
20030512222712.U19949@plum.flirble.org
On Mon, May 12, 2003 at 07:18:05PM +0200, Tassilo von Parseval wrote:
> On Mon, May 12, 2003 at 10:35:36AM +0000 vishnu@pobox.com (via RT) wrote:

> > The generated code is wrapped with:
> > 
> > #ifdef SPECIAL_CONST
> >  return SPECIAL_CONST;
> > #else
> >  return PERL_constant_NOTDEF;
> > #endif
> > 
> > This totally breaks with enums.  If there some way to use this
> > cool code generator with enums?

I'm glad you like it.

> This is basically what I asked about in bugreport #21887. I am currently
> patching h2xs to make it understand enums. Once I fully understand how
> the different command-line switches of h2xs play together I can submit

I'm not sure if it's clear from Tassilo's message, but in the followups
to the initial bug report I explained how you could manually generate
perl code to instruct ExtUtils::Constant to generate code that works
with enums. See


http://rt.perl.org/rt2/Ticket/Display.html?id=21887

> the patch. It will then include a new switch -e/--omit-enums with which
> h2xs can be told to fall back to the old behaviour of ignoring enums.
> The additional switches haven't yet been discussed here but that will be
> done (or will not, if no one objects) when the patch is ready.

However, I didn't have the courage or stamina to get h2xs to do it
automatically, so when he pulls this off, it will be impressive and very
useful.

Nicholas Clark

Thread Previous


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