Wed Jun 23 10:38:26 2010: Request 58579 was acted upon.
Transaction: Correspondence added by SMUELLER
       Queue: Wx
     Subject: Re: [rt.cpan.org #58579] Compile Wx constants without exporting 
Wx constants 
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: ad...@cpan.org
      Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=58579 >


Hi Adam,

Adam Kennedy via RT wrote:
> Tue Jun 22 07:27:02 2010: Request 58579 was acted upon.
>      Subject: Compile Wx constants without exporting Wx constants

>   use Wx ();
>   
>   my $value = Wx::wxDefaultPosition;

Without saying anything about whether the following is good or not: The 
reason it works like this is that the constants are generated via 
AUTOLOAD. They are listed in Constant.xs.

I wonder why Wx doesn't use ExtUtils::Constant to generate the constants 
(also using AUTOLOAD, usually). EU::Constant can generate code that is 
likely more efficient than the repeated call to strEQ. Is it because of 
the ifdefs on wxWidgets versions? Would it be worthwhile to patch 
EU::Constant to allow for this kind of conditional code generation?

If we assumed somebody wanted all those constants anyway, we could 
generate the XSUBs at XS compile time.

--Steffen

Reply via email to