in reply to What does arrow (->) refer to?
Specifically to the lines you have asked about:
@entries = $mesg->entries;
Invoke the entries method on the $mesg object. The method is a member function of the class of which the object is an instance, or is a member function of a class from which the object's class inherits. The method is invoked without arguments. The method is invoked in list context (determined by assignment to the @entries array) and a list of zero or more elements returned by the method call is assigned to the array.
print "dn: " . $entry->dn() . "\n";
Invoke the dn method on the $entry object with no arguments. Method is invoked in scalar context as determined by the . (string concatenation) operator, so a scalar returned by the method call is converted to a string, concatenated with other strings and printed.
@attrs = $entry->attributes();
Invoke the attributes method on the $entry object with no arguments. Method is invoked in list context; list returned by the method call is assigned to @attrs array.
$entry->get_value($attr);
Invoke the get_value method on the $entry object with $attr as an argument. Method is invoked in list context (as determined by its invocation in the argument list of a printf function call in a statement in other code). List returned by method call becomes a part of the printf function call argument list.
Update: Fixed <p> tags per GrandFather. Also: minor wording changes.
|
|---|