Perl/Tk problem with TCC (13&14)

Jun 4, 2008
30
0
The problem is not with actually executing Tk in perl program but just including it. Here is the perl program:

t0.pl is 'print "Hello Word\n";'

In TCC type in "t0" and you get "Hello World". Do it again an the same thing. As expected.

Now add a line:
use Tk;
print "Hello World\n";

Open a new tab and type "t0" and you get "Hello World". Type it in again you get nothing.

Close the tab, open a new one and repeat the sequence. You will get "Hello World" the first time and nothing after that. Type in 'perl t0.pl' and you get "Hello World" every time.

Any solution?

David
 

rconn

Administrator
Staff member
May 14, 2008
12,345
150
Are you using the internal Perl support in TCC (i.e., did you check the box in OPTION / Startup / Scripting / Perl)? If not, this has nothing to do with TCC.

If you did, then you still need to have installed PerlScript (the WSH COM interface). If you didn't, it doesn't have anything to do with TCC.

If you did enabled internal Perl support in TCC and installed PerlScript, then ... it still doesn't have anything to do with TCC. TCC simply invokes PerlScript with the specified script file name and arguments. You'll need to take this up with the developers of the PerlScript / Tcl version you are using.
 
Jun 4, 2008
30
0
Well maybe. There is another wrinkle: I invoked the program repeatedly and got the following results:
#1 - Hello World
#2 to #6 - nothing displayed
#7 to ?? Hello World

Also this behaviour only happens on the first set of executions after opening a new tab. I don't know if Perl.exe closes after each execution but if it does the it seems to me that TCC is the only thing that could be maintaining some artifact that would cause this behaviour on subsequent execution.

I could be mistaken but since I don't know the internals of TCC nor of Perl/Tk the only workaround is the use "perl script.pl" instead of "script.pl" on the command line. Not really a big deal.

David
 

rconn

Administrator
Staff member
May 14, 2008
12,345
150
TCC definitely does not do *anything* to maintain a persistent interpreter. It just calls the WSH active scripting Perl interpreter -- if somebody is maintaining artifacts it would have to be either WSH or the Perl active script.

Previously, TCC did maintain a persistent Perl interpreter and executed Perl scripts by calling the Perl dll's directly. But I had to abandon that because of numerous (and increasing) fatal errors in the embedded Perl code for Windows. (The Perl developers obviously don't spend much time either coding or testing for the Windows environment.)
 
Similar threads
Thread starter Title Forum Replies Date
vefatica Documentation TPIPE, /perl, DotMatchesNewLines Support 1
David McClelland TCMD 24 & Perl - perl thinks it's own executable is ...\TCMD24\TCC.EXE??? Support 3
vefatica Embedded perl and stdout? Support 9
jbanaszczyk Non ActiveState Python/Perl Support 4
R How to? use @everything perl regex Support 2
vefatica TPIPE's /perl option? Support 1
I perl output is not visible Support 4
mikea Perl and tcc (redux) Support 7
mikea How to? TCC 15: popup windows; launching Perl scripts Support 10
M Missing PERL command-line arguments Support 1
D Documentation @PERL Support 6
epement Strawberry Perl batch file errors Support 15
David McClelland Invoking TCC FROM Perl 5.12 Support 3
M @Perl on 64bit W7 Support 7
L redirection to/by perl acts bizarrely Support 9
B Perl not working Support 8
B @PERL[expression] definition? Support 2
J How does tcc search for perl*.dll Support 1
H TTC Equivalent to Perl `One-Liner' Support 3
vefatica 9.02.156 and Perl Support 4
J @PERL and ^C Support 4
Dick Johnson Weird Color Problem Support 8
fishman@panix.com Problem with 27.15 Support 2
M Problem with VSDevCmd.bat in VS 16.7.3 Support 0
R Problem with @INT[ value] in V26 Support 9
M Selecting test "off by one" problem in Take command Support 4
Alpengreis UTF-8 problem in TCC related to Python Support 7
K_Meinhard Small problem in german IDE 26 Support 3
B Problem with color in nested shells Support 1
Joe Caverly Problem creating and switching to a DESKTOP Support 9
vefatica Another popup problem Support 10
Alpengreis ffind dialog (/W) problem Support 4
Alpengreis [TCMD v25.00.24] Small space problem with the DE translation in Prefs-GUI Support 1
Alpengreis [TCMD v25.00.24] Problem with copy and paste and the # char via mouse in TCC Support 6
A Problem with functions @int @decimal and identifying Powershell as a shell. Support 12
B IF command problem in tcexit.btm Support 9
fishman@panix.com Problem at Startup of TCC Support 3
P Problem with SFTP copies Support 7
P Problem with FTP copies Support 10
Jay Sage Problem with Context Menu Copy+Paste+Run Key Assignment Support 7
R Problem with %_do_loop in nested do loops Support 2
fishman@panix.com New Problem with later Windows 10 Support 10
Peter Murschall A little problem with LEAVE and COMMENT Support 5
M Handling of %~I problem Support 4
WinLanEm FOR problem Support 18
K Problem With SCRPUT /u Support 3
vefatica What's TCMD's problem with ^e[0m? Support 13
Peter Murschall IDE: RTL with non-English resources-problem is back in Build 28 Support 4
rps Regex problem: \xnn not recognized as a hex character Support 0
rps PRIORITY LOW problem Support 1

Similar threads