From: Arthur S. <asc...@ve...> - 2006-08-25 23:11:36
|
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; use GUI::Win; # Windows GUI Examples WindowStart(); # Undefined subroutine &GUI::WindowStart called at GUI.pl line 11. # GUI/Win.pm package GUI::Win; use Win32::GUI; # works when commented, fails when not use Exporter; # Export symbols use vars qw($VERSION @ISA @EXPORT); our @ISA = qw(Exporter); our @EXPORT = qw(WindowStart); our $VERSION = '1.00.00'; sub WindowStart { print "ABC\n"; return 1; } ### WindowStart 1; |
From: Robert M. <rm...@po...> - 2006-08-30 19:01:37
|
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/ |
From: Reini U. <ru...@x-...> - 2006-08-30 19:12:42
|
Robert May schrieb: > 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? Better sooner than later. I was here at that times when when it was called GUI. Dada's old examples used it, but I saw no code using it anymore for years. |
From: Robert M. <rm...@po...> - 2006-08-31 18:20:36
|
Reini Urban wrote: > Robert May schrieb: >> 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? > > Better sooner than later. > > I was here at that times when when it was called GUI. > Dada's old examples used it, but I saw no code using it anymore for years. I'll give it another few days for anyone to object, otherwise I'll remove it. Regards, Rob. |