Skip Menu |
 

This queue is for tickets about the Tcl CPAN distribution.

Report information
The Basics
Id: 29913
Status: resolved
Priority: 0/
Queue: Tcl

People
Owner: Nobody in particular
Requestors: bobby.jafari [...] senetas.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Problems with Tcl Perl Module executing pkg_mkIndex and package require ...
Date: Thu, 11 Oct 2007 16:47:59 +1000
To: <bug-Tcl [...] rt.cpan.org>
From: "Bobby Jafari" <bobby.jafari [...] senetas.com>
Dear TCL Module Developers, I am writing to u as a last resort option for something that I think may be a bug with your module. I have a sample code bellow (The attached file needs to be copied to C:/Tcl/lib). Using the tclsh command will allow the execution of these tcl commands, but invoking them from Perl will give error.: Use Tcl; my $tclSession = new Tcl; $tclSession -> Eval ('cd C:/Tcl/lib'); # This works fine $tclSession -> call ("pkg_mkIndex", "C:/Tcl/lib", "*.tcl"); # TCL Module can't handle this $tclSession -> Eval ("package require AgtClient"); # TCL Module can't handle this ---------------------------------- ERROR ---------------------------------- Tcl error 'invalid command name "pkg_mkIndex" at C:/Perl/site/lib/Tcl.pm line 542. ' while invoking scalar result call: "pkg_mkIndex C:/Tcl/lib *.tcl" at C:/Perl/site/lib/Tcl.pm line 545 Tcl::call('Tcl=SCALAR(0x225450)', 'pkg_mkIndex', 'C:/Tcl/lib', '*.tcl') called at C:\SVN\qa-tests\2093\testcase\n2x-setup.pl line 112 Or my $tclSession = new <<AgtClient.tcl>> Tcl; $tclSession -> Eval ('cd C:/Tcl/lib'); # This works fine $tclSession -> Eval ("pkg_mkIndex C:/Tcl/lib *.tcl"); # TCL Module can't handle this $tclSession -> Eval ("package require AgtClient"); # TCL Module can't handle this ---------------------------------- ERROR ---------------------------------- invalid command name "pkg_mkIndex" at C:\SVN\qa-tests\2093\testcase\n2x-setup.pl line 112. I get the same error as above for using the invoke methods. I need to use your module so that it allows me to automate QA testing using an Agilent Test module. I need to run TCL in such a way to keep all the tclsh environment variable alive, during the execution of the Perl script. Using a system call will not work as each system call has its own environment value and variables, hence my interest in Tcl Module. I am using Tcl-0.95 and running it in Windows XP. I am using perl, v5.8.8 built for MSWin32-x86-multi-thread I am using ActiveTcl8.4.16.0.282109-win32-ix86-threaded.exe Any advice would be greatly appreciated. Regards, Bobby Test Engineer Senetas Corp
Download AgtClient.tcl
application/octet-stream 46.4k

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 452b
for some commands, you also need to issue Init method: use Tcl; my $int = new Tcl; $int->Init; $int->Eval('pkg_mkIndex a b'); --- no files matched glob pattern "b" at t.tcl.pl line 5. --- ...whereas w/o Init we have: use Tcl; my $int = new Tcl; $int->Eval('pkg_mkIndex a b'); --- invalid command name "pkg_mkIndex" at t.tcl.pl line 4. --- if you need closer investigations on the matter, please let us know and please reopen the ticket. closing now


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.