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

Discussion in 'Perl Misc' started by Phil, Jul 7, 2006.

  1. Phil

    Phil Guest

    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
    Phil, Jul 7, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Kamoski
    Replies:
    3
    Views:
    15,645
    Jay B. Harlow [MVP - Outlook]
    Aug 9, 2003
  2. Phil Endecott

    Obj* ptr = new Obj(X)

    Phil Endecott, Jun 3, 2005, in forum: C++
    Replies:
    5
    Views:
    449
    Mark P
    Jun 3, 2005
  3. Shalabh Chaturvedi
    Replies:
    2
    Views:
    429
    Mike C. Fletcher
    Feb 20, 2004
  4. Matthew Thorley

    How do you convert a string obj to a file obj?

    Matthew Thorley, May 4, 2005, in forum: Python
    Replies:
    7
    Views:
    488
    Peter Otten
    May 4, 2005
  5. alf
    Replies:
    9
    Views:
    390
Loading...

Share This Page