Thu Jun 24 23:48:35 2010: Request 58579 was acted upon.
Transaction: Correspondence added by a...@ali.as
       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: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=58579 >


On 25 June 2010 03:57, j...@activestate.com via RT <bug...@rt.cpan.org> wrote:
> <URL: https://rt.cpan.org/Ticket/Display.html?id=58579 >
>
> On Tue, 22 Jun 2010, Adam Kennedy via RT wrote:
> [...]
>> The problem is that you can't avoid doing this importing even if you
>> want to.
>>
>> The following does not work.
>>
>>   use Wx ();
>>
>>   my $value = Wx::wxDefaultPosition;
>
> Yes, because Wx::wxDefaultPosition is just a bareword here, so it will
> be interpreted as a string literal if the function has not yet been
> defined. It should work correctly if you add parenthesis though:
>
>    my $value = Wx::wxDefaultPosition();

Of course you can do that, I just feel I shouldn't have to.

There are currently 1,154 places in 94 files in just the core Padre
code where we call a Wx constant. I would rather like to avoid needing
94 import declarations, or needing 2,308 parenthesis characters.

And if the constants were all fast/inlined, that would be nice too.

Adam K

Reply via email to