Re: Possible bug in Tcl.pm exposed by Tktable?
[email protected] (Christopher Chavez) Mon, 16 Mar 2020 04:22:13 -0500
| Newsgroups | perl.tcltk |
|---|---|
| Message-ID | <[email protected]> |
On 3/16/2020 4:09 AM, Christopher Chavez wrote:
> That page mentioned the Tcl exit command, which I've never used
> from Perl. Adding it completely prevents the error:
>
>
> =C2=A0=C2=A0=C2=A0 use Tcl;
> =C2=A0=C2=A0=C2=A0 my $i =3D new Tcl;
> =C2=A0=C2=A0=C2=A0 $i->Init;
> =C2=A0=C2=A0=C2=A0 $i->Eval(<<'EOS');
>
> =C2=A0=C2=A0=C2=A0 package require Tk
> =C2=A0=C2=A0=C2=A0 package require Tktable
> =C2=A0=C2=A0=C2=A0 destroy .
> =C2=A0=C2=A0=C2=A0 exit
>
> =C2=A0=C2=A0=C2=A0 EOS
>
>
> But should things like destroying the root window and Tcl exit really
> be necessary to prevent errors during normal usage?
Actually, doing $i->Eval('exit') makes the entire program exit
immediately without letting Perl continue execution or perform
its own exit, so maybe it's not a good idea to use it.
Christopher A. Chavez