Bug in $obj->expect() ... ? (Expect 1.15)

P

Phil

So I have a bunch of modules and a script running on Solaris, and am
now testing on Mac OS X.

An expect object is instantiated, and stored within a hash, something
like:

$hash->{_expect} = new Expect;

Then, later I make calls to this object's expect() method like so:

$hash->{_expect}->expect(......);

On Solaris, this works no problem, however, on Mac OS X, I get the
following:

expect(): ERROR: if called directly (not as $obj->expect(...), but as
Expect::expect(...), first parameter MUST be '-i' to set an object
(list) for the patterns to work on.

So, I've printed $_[0] within Expect's expect() subroutine, and the
only difference is:

$VAR1 = bless( {
'_expect' => bless( \*Symbol::GEN2, 'Expect' ),


$VAR1 = bless( {
'_expect' => bless( \*Symbol::GEN3, 'Expect' ),

The former being from the Mac OS X installation, and the latter from
the Solaris (2.9) Installation. Both are Expect 1.15, and Perl 5.8.6.

Thoughts?

--phil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,056
Members
48,769
Latest member
Clifft

Latest Threads

Top