From: Rafael Garcia-Suarez Date: Fri, 13 Feb 2009 15:59:22 +0000 (+0100) Subject: Document error "Smart matching a non-overloaded object breaks encapsulation" X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=229c18ce2bca758e413c5cf4f86e43dac52f4884;p=p5sagit%2Fp5-mst-13.2.git Document error "Smart matching a non-overloaded object breaks encapsulation" That error was added in e67b97bd974194ad616acbb7813c5631aacd6be7 --- diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 03b5150..70a432d 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -3895,6 +3895,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.