Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > $browser->get($module_form);

Reply
Thread Tools

$browser->get($module_form);

 
 
Gary
Guest
Posts: n/a
 
      02-13-2008
Trying to understand what the -> does please.

Cannot find it in the perl docs etc.
Gary


 
Reply With Quote
 
 
 
 
Joost Diepenmaat
Guest
Posts: n/a
 
      02-13-2008
"Gary" <(E-Mail Removed)> 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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments