Document error "Smart matching a non-overloaded object breaks encapsulation"
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Fri, 13 Feb 2009 15:59:22 +0000 (16:59 +0100)
committerDavid Mitchell <davem@iabyn.com>
Tue, 14 Apr 2009 20:18:47 +0000 (21:18 +0100)
That error was added in e67b97bd974194ad616acbb7813c5631aacd6be7

(cherry picked from commit 229c18ce2bca758e413c5cf4f86e43dac52f4884)

pod/perldiag.pod

index f7b8254..0361375 100644 (file)
@@ -3898,6 +3898,12 @@ superfluous.
 (W signal) The signal handler named in %SIG doesn't, in fact, exist.
 Perhaps you put it into the wrong package?
 
+=item Smart matching a non-overloaded object breaks encapsulation
+
+(F) You should not use the C<~~> operator on an object that does not
+overload it: Perl refuses to use the object's underlying structure for
+the smart match.
+
 =item sort is now a reserved word
 
 (F) An ancient error message that almost nobody ever runs into anymore.