aboutsummaryrefslogtreecommitdiff
path: root/Perl
diff options
context:
space:
mode:
Diffstat (limited to 'Perl')
-rw-r--r--Perl/Zinc/Debug.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/Perl/Zinc/Debug.pm b/Perl/Zinc/Debug.pm
index bfef8aa..6b92f45 100644
--- a/Perl/Zinc/Debug.pm
+++ b/Perl/Zinc/Debug.pm
@@ -54,6 +54,11 @@ my @instances;
sub BEGIN {
# test if ZincDebug is loaded using the -M perl option
$preload = 1 if (caller(2))[2] == 0;
+ return unless $preload;
+ # parse ZincDebug options
+ my @options = @ARGV;
+ use Getopt::Long;
+
}
# Hack to capture the instance of zinc. ZincDebug functions are invoked here.
@@ -1496,7 +1501,7 @@ sub showinstancehelp {
my $zinc = shift;
my $title = shift;
my $singleflag = shift;
- $zinc->Tk::focus;
+ &takefocus($zinc);
$help_tl{$zinc}->destroy if $help_tl{$zinc} and Tk::Exists($help_tl{$zinc});
if ($singleflag) {
$help_tl{$zinc} = $zinc->Toplevel;
@@ -1775,6 +1780,7 @@ sub takefocus {
sub newinstance {
my $zinc = shift;
return if $instances{$zinc};
+ &takefocus($zinc);
$instances{$zinc} = 1;
push(@instances, $zinc);