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
Message body not shown because it is not plain text.