From d621241efac980a2bf42ef3ad005c8b884910567 Mon Sep 17 00:00:00 2001 From: etienne Date: Thu, 29 Apr 2004 08:28:25 +0000 Subject: supress warnings and mention the Tk::Zinc::Trace::off variable in manual. --- Perl/Zinc/Trace.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Perl/Zinc') diff --git a/Perl/Zinc/Trace.pm b/Perl/Zinc/Trace.pm index ad219e6..f115171 100644 --- a/Perl/Zinc/Trace.pm +++ b/Perl/Zinc/Trace.pm @@ -72,6 +72,9 @@ my %ZincHash; sub Tk::Zinc::WidgetMethod { my ($zinc, $name, @args) = @_; + if (defined $Tk::Zinc::Trace::off and $Tk::Zinc::Trace::off > 0) { + return &$WidgetMethodfunction(@_) if $WidgetMethodfunction; + } my ($package, $filename, $line) = caller(1); $package="" unless defined $package; $filename="" unless defined $filename; @@ -151,6 +154,8 @@ core dumps and you have no clue which method call can be responsible for. If you just want to trace Tk::Zinc errors when calling a method you should rather use the Tk::Zinc::TraceErrors module +The global variable $Tk::Zinc::Trace:off can be used to trace some specific blocks. If set to 1, traces are deactivated, if set to 0, traces are reactivated. + If the global variable $Tk::Zinc::Trace:ForReplay is set or if the --code option is set in the second form, the printout will be very close to re-executable code, like this: -- cgit v1.1