diff options
-rw-r--r-- | Perl/Zinc/Trace.pm | 5 |
1 files changed, 5 insertions, 0 deletions
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: |