Skip to content

Commit d728b4a

Browse files
committed
Don't assume .WHAT and friends are normal
Some of them may be implemented as normal methods or operators for now, but we still reserve the right to change any of them into magical ponies.
1 parent 221ef4b commit d728b4a

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

S12-objects.pod

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Synopsis 12: Objects
1313

1414
Created: 27 Oct 2004
1515

16-
Last Modified: 30 Dec 2013
17-
Version: 133
16+
Last Modified: 26 Oct 2014
17+
Version: 134
1818

1919
=head1 Overview
2020

@@ -2300,9 +2300,18 @@ These may be used either as methods or as unary operators:
23002300
$obj.WHAT # method form of P5's ref
23012301
WHAT $obj # unary form of P5's ref
23022302

2303-
These are all actually macros, not true operators or methods. If you get
2304-
a foreign object from another language and need to call its C<.WHERE> method,
2305-
you can say:
2303+
These should all be considered built-in language primitives, not
2304+
true operators or methods, even if a given implementation happens to
2305+
implement one or more of them that way. The optimizer reserves the
2306+
right to assume it knows what these names mean without user meddling.
2307+
Do not attempt to override or overload them, or bend them into twisty
2308+
little brain pretzels, except to fulfill those parts of the standard
2309+
interface that require you to do so. (Value types, for instance,
2310+
currently require a definition of WHICH. This too may change as
2311+
our notions of identity are refined.)
2312+
2313+
If you get a foreign object from another language and need to call
2314+
its C<.WHERE> method, you can say:
23062315

23072316
$obj."WHERE"()
23082317

0 commit comments

Comments
 (0)