Re: WinXP, AS 5.8.6, and Tk::Configure in perl -d
Eric Promislow <[email protected]>
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <[email protected]> |
Dean Arnold wrote:
> Eric Promislow wrote:
>
>> Dean Arnold wrote:
>>
>>[...]
>>
>>
>> Which debugger?
>
>
>
> Plain old "perl -d".
>
> - Dean Arnold
The case I ran into with Komodo was that we had
the sub hook calling eval { ... } after it executed
the user's code, as in this sequence:
sub sub {
...
@ret = &$sub;
eval { debugger_code(); }
...
}
So if the underlying code set $@, this value
would be cleared by the eval-code. This isn't
a problem for most code, but much of Tk emulates
tcl's exception handling by catching an exception,
making a normal return from the function, and then
checking for $@. If the debugger is the culprit,
I would try putting a simple 'local $@' at the
start of sub sub
sub sub {
local $@;
...
}
and see if the problem disappears. I don't see any
obvious problems in the perl 5.8 debugger.
- Eric
sub sub {
# ...
# Prologue to calling underlying function...
# Determine the sub's return type,and capture approppriately.
if (wantarray) {
# Called in array context. call sub and capture output.
# DB::DB will recursively get control again if appropriate; we'll come
# back here when the sub is finished.
if ($assertion) {
$assertion = 0;
eval { @ret = &$sub; };
...
}
Calling that eval() is going to
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server. If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to [email protected]