Arthur Schwarz wrote:
I can't get the 'Exporter' to work when I 'use Win32::GUI'. Example code
included below. Any fix? Anything I misunderstand?
Cygwin Perl v5.8.7
Win32::GUI Win32-GUI-1.03 (12 Apr 2006)
art
# GUI.pl
package GUI;
Don't use package GUI. The following code appears near the top of GUI.pm:
# Reserves GUI in the main namespace for us (uhmmm...)
*GUI:: = \%Win32::GUI::;
That will effectively move anything you define in the package GUI into
the package Win32::GUI - which already has it's own exporter, so I'm not
surprised you're seeing problems.
I've looked at it a number of times and would like to remove it, but I
don't know it's history. I assume it's there for historic backwards
compatibility reasons, and that the package was originally just called
'GUI' rather than 'Win32::GUI' - this line would have kept old code
running - but I haven't been around long enough to be sure there isn't
anything else that depends on this.
Does anyone know for sure? Should we remove it?
Regards,
--
Robert May
Win32::GUI, a perl extension for native Win32 applications
http://perl-win32-gui.sourceforge.net/