fix smart match docs for lhs undef
authorJesse Luehrs <doy@tozt.net>
Thu, 7 Jul 2011 08:21:16 +0000 (03:21 -0500)
committerFlorian Ragwitz <rafl@debian.org>
Thu, 7 Jul 2011 19:57:05 +0000 (21:57 +0200)
undef ~~ 0 is false, but undef == 0 is true - this one is falling under
the undef ~~ Any case, not the Any ~~ Num case.

pod/perlsyn.pod

index a914f85..702ebed 100644 (file)
@@ -820,9 +820,9 @@ C<grep> does not.
     Any     Regex     pattern match            $a =~ /$b/
 
     Object  Any       invokes ~~ overloading on $object, or falls back:
+    undef   Any       undefined                !defined($b)
     Any     Num       numeric equality         $a == $b
     Num     numish[4] numeric equality         $a == $b
-    undef   Any       undefined                !defined($b)
     Any     Any       string equality          $a eq $b
 
  1 - empty hashes or arrays will match.