Package: perl-doc
Version: 5.8.8-6.1
Severity: wishlist
File: /usr/share/man/man3/constant.3perl.gz
Tags: patch

The follow patch is wrong----maybe-------I have no idea.
-----------who knows...............not me.
----------I have now removed all usage of "constant" from my
program-----as it is abstruse to me.

--- /usr/share/perl/5.8.8/constant.pod  2006-08-07 00:00:08.000000000 +0800
+++ /tmp/constant.pod   2007-01-06 12:35:41.016419000 +0800
@@ -86,8 +86,12 @@
 
 =head2 List constants
 
-Constants may be lists of more (or less) than one value.  A constant
-with no values evaluates to C<undef> in scalar context.  Note that
+Constants may be lists of more (or less) than one value:
+
+    use constant BLA => (0,4);
+    print (BLA)[1]; #prints 4
+
+A constant with no values evaluates to C<undef> in scalar context.  Note that
 constants with more than one value do I<not> return their last value in
 scalar context as one might expect.  They currently return the number
 of values, but B<this may change in the future>.  Do not use constants
@@ -120,7 +124,8 @@
 
     use constant {
         FOO => "A single value",
-        BAR => "This", "won't", "work!",        # Error!
+##      BAR => "This", "won't", "work!",        # Error!
+        NUBAR => ("But", "this", "will")
     };
 
 This is a fundamental limitation of the way hashes are constructed in


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to