mercutio_viz has asked for the wisdom of the Perl Monks concerning the following question:
Perl Monks,
I am blessed/cursed with being in a M$ environment for a particular project. I am using Perl to automate a terminal emulator that accesses a legacy system. The host system is a 3270 mainframe. My terminal emulator is SmarTerm (ST) by Esker.
The ST macro language and OLE objects are very rich, which is why I chose this piece of software. I was initially doing this work in VB6 but I scrapped that the moment I heard of Win32::OLE!
Here's my problem: the ST objects have a number of properties that are set as lvalues. For example, there is a timeout setting, the number of seconds that the program will sit and wait for one or more strings to be sent by the host. In VB6 you'd code it like this:
"StringWait" is a property of the ST object. As you can see, it is on the left side of the = sign. In Perl you can't do this:st.StringWait = 20 ' set timeout to 20 seconds ' Where 'st' the SmarTerm session object
I've already tried this, just for kicks:$st->StringWait = 20; # lvalue error! # Where '$st' is the SmarTerm session object
$st->StringWait(20); # compiles ok but no effect
Is there a Perl way of interfacing with these OLE objects that are traditionally set by using an lvalue?
Your insights and comments are welcomed and appreciated!
-MC
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32::OLE and lvalue issue
by ikegami (Patriarch) on Jun 15, 2005 at 06:18 UTC | |
by mercutio_viz (Scribe) on Jun 15, 2005 at 06:54 UTC | |
by mercutio_viz (Scribe) on Jun 15, 2005 at 07:07 UTC | |
by ikegami (Patriarch) on Jun 15, 2005 at 13:56 UTC |