Thu Jun 24 13:57:29 2010: Request 58579 was acted upon.
Transaction: Correspondence added by j...@activestate.com
       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 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();

Cheers,
-Jan



Reply via email to