$browser->get($module_form);

Discussion in 'Perl Misc' started by Gary, Feb 13, 2008.

  1. Gary

    Gary Guest

    Trying to understand what the -> does please.

    Cannot find it in the perl docs etc.
    Gary
     
    Gary, Feb 13, 2008
    #1
    1. Advertising

  2. "Gary" <> writes:

    > Trying to understand what the -> does please.
    >
    > Cannot find it in the perl docs etc.
    > Gary


    It should be in perlref and perltoot at least. -> is (one of) the
    dereferencing operators in perl. In cases where the left-hand side of ->
    is an object (as in, a reference to a thing bless()ed into a package),
    -> and the right hand side looks like a function call parameter list, ->
    does a method lookup:

    $object->method($arg1,$arg2);

    here the method named "method" is looked up according to the inheritance
    graph of whatever package (class) $object is blessed in, and calls it
    with arguments $arg1 and $arg2 (and it passes $object too, as the first
    argument, preceding the rest).

    --
    Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
     
    Joost Diepenmaat, Feb 13, 2008
    #2
    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. Lauchlan M
    Replies:
    2
    Views:
    447
    John Saunders
    Aug 17, 2003
  2. DKM
    Replies:
    15
    Views:
    786
  3. xyZed
    Replies:
    9
    Views:
    648
    Big Bill
    May 12, 2004
  4. ai4u
    Replies:
    0
    Views:
    2,842
  5. Nathan Sokalski
    Replies:
    4
    Views:
    7,181
    Nathan Sokalski
    Jul 8, 2008
Loading...

Share This Page