Your message dated Mon, 21 Apr 2008 23:03:42 +0300
with message-id <[EMAIL PROTECTED]>
and subject line Re: Bug#406101: constant.3perl.gz: add discoveries perhaps if 
clearer
has caused the Debian Bug report #406101,
regarding constant.3perl.gz: add discoveries perhaps if clearer
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
406101: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=406101
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
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


--- End Message ---
--- Begin Message ---
On Mon, Jan 08, 2007 at 11:53:24PM +0800, Dan Jacobson wrote:
> 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.

> +    use constant BLA => (0,4);
> +    print (BLA)[1]; #prints 4

Using parentheses to slice the list is already shown in the WEEKDAYS
example, so I don't think this adds much.

>      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

It won't work, because of the fundamental limitation mentioned.  You are
supplying a hash with the keys "FOO", "NUBAR" and "this", and getting
constants by the same name.

I'm closing this.

Cheers,
-- 
Niko Tyni   [EMAIL PROTECTED]


--- End Message ---

Reply via email to