Author: larry
Date: Thu Dec 28 13:35:41 2006
New Revision: 13504
Modified:
doc/trunk/design/syn/S12.pod
Log:
Fossil of old foo($bar) semantics found by b_jonas++.
Modified: doc/trunk/design/syn/S12.pod
==============================================================================
--- doc/trunk/design/syn/S12.pod (original)
+++ doc/trunk/design/syn/S12.pod Thu Dec 28 13:35:41 2006
@@ -12,9 +12,9 @@
Maintainer: Larry Wall <[EMAIL PROTECTED]>
Date: 27 Oct 2004
- Last Modified: 19 Dec 2006
+ Last Modified: 28 Dec 2006
Number: 12
- Version: 34
+ Version: 35
=head1 Overview
@@ -779,20 +779,9 @@
=head2 Method call vs. Subroutine call
-The caller indicates whether to make a method call or subroutine call
-by the call syntax. The "dot" form and the indirect object form default to
-method calls. Calls with multiple arguments and operators with multiple
-operands default to subroutine calls.
-
-A function call with a single argument defaults to method calls:
-
- close($handle)
- close $handle
-
-Use a trailing comma if you want to make a subroutine call instead:
-
- close($handle,)
-
+The caller indicates whether to make a method call or subroutine
+call by the call syntax. The "dot" form and the indirect object form
+default to method calls. All other prefix calls default to subroutine calls.
This applies to prefix unary operators as well:
!$obj; # same as $obj.prefix:<!>
@@ -804,6 +793,8 @@
A subroutine call considers only visible subroutines (including submethods) of
that name. There is no fail-over from subroutine to method dispatch.
+However, you may use C<is export> on a method call definition to also
+make it available as a multi sub.
=head1 Multi dispatch