develooper Front page | perl.perl5.porters | Postings from October 2003

[PATCH] Re: [PATCH pod/perlfunc.pod] ref can return false on references

Thread Previous | Thread Next
From:
schwern
Date:
October 6, 2003 12:42
Subject:
[PATCH] Re: [PATCH pod/perlfunc.pod] ref can return false on references
Message ID:
20031006124128.C20960@ttul.org
On Mon, Oct 06, 2003 at 05:55:21AM -0700, Abigail wrote:
> -Returns a true value if EXPR is a reference, false otherwise.  If EXPR
> +Returns a non-empty string if EXPR is a reference, the empty
> +string otherwise. If EXPR
>  is not specified, C<$_> will be used.  The value returned depends on the
>  type of thing the reference is a reference to.
>  Builtin types include:

This reads a little better.  

  Returns the reference type or class if EXPR is a reference, the empty
  string otherwise.

I also reindented.  I don't think its necessary to go into a discussion
of edge cases nor to rework the example to say "if(ref($r) eq '')" instead
of "unless(ref($r))" because honestly I don't think anyone is going to
go around and change all their code in case some joker sets their classname
to 0.

--- pod/perlfunc.pod	2003/10/06 19:35:01	1.1
+++ pod/perlfunc.pod	2003/10/06 19:37:06
@@ -3987,11 +3987,10 @@
 
 =item ref
 
-Returns a non-empty string if EXPR is a reference, the empty
-string otherwise. If EXPR
-is not specified, C<$_> will be used.  The value returned depends on the
-type of thing the reference is a reference to.
-Builtin types include:
+Returns the reference type or class if EXPR is a reference, the empty
+string otherwise. If EXPR is not specified, C<$_> will be used.  The
+value returned depends on the type of thing the reference is a
+reference to.  Builtin types include:
 
     SCALAR
     ARRAY


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About